From patchwork Thu Jul 16 21:21:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Christophe Dubois X-Patchwork-Id: 496907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EDAAA140773 for ; Fri, 17 Jul 2015 07:28:29 +1000 (AEST) Received: from localhost ([::1]:42005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFqhf-0002ck-TV for incoming@patchwork.ozlabs.org; Thu, 16 Jul 2015 17:28:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFqay-0007hU-BE for qemu-devel@nongnu.org; Thu, 16 Jul 2015 17:21:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFqav-0001oe-65 for qemu-devel@nongnu.org; Thu, 16 Jul 2015 17:21:32 -0400 Received: from zose-mta05.web4all.fr ([185.49.20.50]:46620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFqau-0001oW-SN for qemu-devel@nongnu.org; Thu, 16 Jul 2015 17:21:29 -0400 Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 7902940440 for ; Thu, 16 Jul 2015 23:21:28 +0200 (CEST) Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZRMurIho7tPR; Thu, 16 Jul 2015 23:21:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta05.web4all.fr (Postfix) with ESMTP id 200B24062A; Thu, 16 Jul 2015 23:21:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose-mta-05.w4a.fr Received: from zose-mta05.web4all.fr ([127.0.0.1]) by localhost (zose-mta05.web4all.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 65n68OD0Pjn6; Thu, 16 Jul 2015 23:21:28 +0200 (CEST) Received: from localhost.localdomain (smm49-1-78-235-240-156.fbx.proxad.net [78.235.240.156]) by zose-mta05.web4all.fr (Postfix) with ESMTPSA id DFE5040440; Thu, 16 Jul 2015 23:21:27 +0200 (CEST) From: Jean-Christophe Dubois To: qemu-devel@nongnu.org Date: Thu, 16 Jul 2015 23:21:26 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.49.20.50 Cc: Jean-Christophe Dubois Subject: [Qemu-devel] [PATCH v13 07/19] i.MX: Fix Coding style for CCM emulator X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * not present on v1 Changes since v2: * not present on v2 Changes since v3: * not present on v3 Changes since v4: * not present on v4 Changes since v5: * not present on v5 Changes since v6: * not present on v6 Changes since v7: * not present on v7 Changes since v8: * Improve logs Changes since v9: * Change patch title. Changes since v10: * no change. Changes since v11: * no change. Changes since v12: * no change. hw/misc/imx_ccm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/misc/imx_ccm.c b/hw/misc/imx_ccm.c index 2e9bd9c..2e19dbb 100644 --- a/hw/misc/imx_ccm.c +++ b/hw/misc/imx_ccm.c @@ -16,11 +16,10 @@ #define CKIH_FREQ 26000000 /* 26MHz crystal input */ #define CKIL_FREQ 32768 /* nominal 32khz clock */ - //#define DEBUG_CCM 1 #ifdef DEBUG_CCM #define DPRINTF(fmt, args...) \ -do { printf("imx_ccm: " fmt , ##args); } while (0) +do { printf("%s: " fmt , TYPE_IMX_CCM, ##args); } while (0) #else #define DPRINTF(fmt, args...) do {} while (0) #endif @@ -28,7 +27,7 @@ do { printf("imx_ccm: " fmt , ##args); } while (0) static int imx_ccm_post_load(void *opaque, int version_id); static const VMStateDescription vmstate_imx_ccm = { - .name = "imx-ccm", + .name = TYPE_IMX_CCM, .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { @@ -110,7 +109,7 @@ static void update_clocks(IMXCCMState *s) s->hsp_clk_freq = s->mcu_clk_freq / (1 + EXTRACT(s->pdr0, HSP)); s->ipg_clk_freq = s->hsp_clk_freq / (1 + EXTRACT(s->pdr0, IPG)); - DPRINTF("Clocks: mcu %uMHz, HSP %uMHz, IPG %uHz\n", + DPRINTF("%s: mcu %uMHz, HSP %uMHz, IPG %uHz\n", __func__, s->mcu_clk_freq / 1000000, s->hsp_clk_freq / 1000000, s->ipg_clk_freq); @@ -136,7 +135,7 @@ static uint64_t imx_ccm_read(void *opaque, hwaddr offset, { IMXCCMState *s = (IMXCCMState *)opaque; - DPRINTF("read(offset=%x)", offset >> 2); + DPRINTF("%s(offset=%x)", __func__, offset >> 2); switch (offset >> 2) { case 0: /* CCMR */ DPRINTF(" ccmr = 0x%x\n", s->ccmr); @@ -177,7 +176,7 @@ static void imx_ccm_write(void *opaque, hwaddr offset, { IMXCCMState *s = (IMXCCMState *)opaque; - DPRINTF("write(offset=%x, value = %x)\n", + DPRINTF("%s(offset=%x, value = %x)\n", __func__, offset >> 2, (unsigned int)value); switch (offset >> 2) { case 0: