From patchwork Wed Feb 20 01:28:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 221944 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CA6D12C008D for ; Wed, 20 Feb 2013 13:24:00 +1100 (EST) Received: from localhost ([::1]:35739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7yUT-00066V-R3 for incoming@patchwork.ozlabs.org; Tue, 19 Feb 2013 20:28:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7yUE-0005uB-Ml for qemu-devel@nongnu.org; Tue, 19 Feb 2013 20:28:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7yUC-0008Ig-Pu for qemu-devel@nongnu.org; Tue, 19 Feb 2013 20:28:42 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:49485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7yUC-0008Ic-Go for qemu-devel@nongnu.org; Tue, 19 Feb 2013 20:28:40 -0500 Received: by mail-pa0-f45.google.com with SMTP id kl14so3686528pab.18 for ; Tue, 19 Feb 2013 17:28:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state; bh=PTaGrNiBcdt44n7RuS26oYXNscuxe3NmFYfFGKdoYec=; b=FRSJQTN0vA5FfwciqW8Ja65ncdxg+pyUDuK8ijG0dDQao3Kwxq6ezrloWdL3OvT1f5 kqGfgoExGR/VXp7bij1YkTSEAb601GOR+KIOSBcNp/q24+FTeN4YKzL/8zer4c/EYbNG xqQICbGvAYN0fYzgsoOppd5tHZFHMoy4uhGxt4yORpr3+hMvxpn0MtR5NG3Nq7tUFRWi 6Djnvc58QUPu1xYlfaAX+81RhWg8p2OODIiT6gP1piXuRWxS9f9Wf+7bqTlzHEWlO55V R7dLQtQqaFv8d+kOjx6CaUfO5YYDSiTdSQj15Ms6To3xkzVJnAdxZiOyyhPzSQyuKHc7 i/pg== X-Received: by 10.66.164.97 with SMTP id yp1mr50747958pab.47.1361323719768; Tue, 19 Feb 2013 17:28:39 -0800 (PST) Received: from localhost ([101.168.89.21]) by mx.google.com with ESMTPS id i6sm109207628paw.19.2013.02.19.17.28.33 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 17:28:39 -0800 (PST) From: Peter Crosthwaite To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2013 11:28:06 +1000 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQl9wxAfJurq0ar9bfngU0TvICQHVm4JerfPopK6WyGGX9f9UH7Rw2bYLcUaWLyL2ZAtV5Su X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.45 Cc: Peter Crosthwaite , edgar.iglesias@gmail.com, aliguori@us.ibm.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH v2 2/5] arm: *mpcore.c: CamelCased type names 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 To conform with QEMU coding style. Signed-off-by: Peter Crosthwaite --- changed from v1: s/MPCorePrivState/ARM11MPCorePriveState (PMM review) hw/a9mpcore.c | 26 +++++++++++++------------- hw/arm11mpcore.c | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/hw/a9mpcore.c b/hw/a9mpcore.c index 673bbd8..33b9e07 100644 --- a/hw/a9mpcore.c +++ b/hw/a9mpcore.c @@ -12,7 +12,7 @@ /* A9MP private memory region. */ -typedef struct a9mp_priv_state { +typedef struct A9MPPrivState { SysBusDevice busdev; uint32_t scu_control; uint32_t scu_status; @@ -23,12 +23,12 @@ typedef struct a9mp_priv_state { DeviceState *mptimer; DeviceState *gic; uint32_t num_irq; -} a9mp_priv_state; +} A9MPPrivState; static uint64_t a9_scu_read(void *opaque, hwaddr offset, unsigned size) { - a9mp_priv_state *s = (a9mp_priv_state *)opaque; + A9MPPrivState *s = (A9MPPrivState *)opaque; switch (offset) { case 0x00: /* Control */ return s->scu_control; @@ -59,7 +59,7 @@ static uint64_t a9_scu_read(void *opaque, hwaddr offset, static void a9_scu_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { - a9mp_priv_state *s = (a9mp_priv_state *)opaque; + A9MPPrivState *s = (A9MPPrivState *)opaque; uint32_t mask; uint32_t shift; switch (size) { @@ -112,7 +112,7 @@ static const MemoryRegionOps a9_scu_ops = { static void a9mp_priv_reset(DeviceState *dev) { - a9mp_priv_state *s = FROM_SYSBUS(a9mp_priv_state, SYS_BUS_DEVICE(dev)); + A9MPPrivState *s = FROM_SYSBUS(A9MPPrivState, SYS_BUS_DEVICE(dev)); int i; s->scu_control = 0; for (i = 0; i < ARRAY_SIZE(s->old_timer_status); i++) { @@ -122,13 +122,13 @@ static void a9mp_priv_reset(DeviceState *dev) static void a9mp_priv_set_irq(void *opaque, int irq, int level) { - a9mp_priv_state *s = (a9mp_priv_state *)opaque; + A9MPPrivState *s = (A9MPPrivState *)opaque; qemu_set_irq(qdev_get_gpio_in(s->gic, irq), level); } static int a9mp_priv_init(SysBusDevice *dev) { - a9mp_priv_state *s = FROM_SYSBUS(a9mp_priv_state, dev); + A9MPPrivState *s = FROM_SYSBUS(A9MPPrivState, dev); SysBusDevice *busdev, *gicbusdev; int i; @@ -196,22 +196,22 @@ static const VMStateDescription vmstate_a9mp_priv = { .version_id = 2, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_UINT32(scu_control, a9mp_priv_state), - VMSTATE_UINT32_ARRAY(old_timer_status, a9mp_priv_state, 8), - VMSTATE_UINT32_V(scu_status, a9mp_priv_state, 2), + VMSTATE_UINT32(scu_control, A9MPPrivState), + VMSTATE_UINT32_ARRAY(old_timer_status, A9MPPrivState, 8), + VMSTATE_UINT32_V(scu_status, A9MPPrivState, 2), VMSTATE_END_OF_LIST() } }; static Property a9mp_priv_properties[] = { - DEFINE_PROP_UINT32("num-cpu", a9mp_priv_state, num_cpu, 1), + DEFINE_PROP_UINT32("num-cpu", A9MPPrivState, num_cpu, 1), /* The Cortex-A9MP may have anything from 0 to 224 external interrupt * IRQ lines (with another 32 internal). We default to 64+32, which * is the number provided by the Cortex-A9MP test chip in the * Realview PBX-A9 and Versatile Express A9 development boards. * Other boards may differ and should set this property appropriately. */ - DEFINE_PROP_UINT32("num-irq", a9mp_priv_state, num_irq, 96), + DEFINE_PROP_UINT32("num-irq", A9MPPrivState, num_irq, 96), DEFINE_PROP_END_OF_LIST(), }; @@ -229,7 +229,7 @@ static void a9mp_priv_class_init(ObjectClass *klass, void *data) static const TypeInfo a9mp_priv_info = { .name = "a9mpcore_priv", .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(a9mp_priv_state), + .instance_size = sizeof(A9MPPrivState), .class_init = a9mp_priv_class_init, }; diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index 324e503..b900b35 100644 --- a/hw/arm11mpcore.c +++ b/hw/arm11mpcore.c @@ -12,7 +12,7 @@ /* MPCore private memory region. */ -typedef struct mpcore_priv_state { +typedef struct ARM11MPCorePriveState { SysBusDevice busdev; uint32_t scu_control; int iomemtype; @@ -23,14 +23,14 @@ typedef struct mpcore_priv_state { DeviceState *mptimer; DeviceState *gic; uint32_t num_irq; -} mpcore_priv_state; +} ARM11MPCorePriveState; /* Per-CPU private memory mapped IO. */ static uint64_t mpcore_scu_read(void *opaque, hwaddr offset, unsigned size) { - mpcore_priv_state *s = (mpcore_priv_state *)opaque; + ARM11MPCorePriveState *s = (ARM11MPCorePriveState *)opaque; int id; /* SCU */ switch (offset) { @@ -53,7 +53,7 @@ static uint64_t mpcore_scu_read(void *opaque, hwaddr offset, static void mpcore_scu_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { - mpcore_priv_state *s = (mpcore_priv_state *)opaque; + ARM11MPCorePriveState *s = (ARM11MPCorePriveState *)opaque; /* SCU */ switch (offset) { case 0: /* Control register. */ @@ -76,11 +76,11 @@ static const MemoryRegionOps mpcore_scu_ops = { static void mpcore_priv_set_irq(void *opaque, int irq, int level) { - mpcore_priv_state *s = (mpcore_priv_state *)opaque; + ARM11MPCorePriveState *s = (ARM11MPCorePriveState *)opaque; qemu_set_irq(qdev_get_gpio_in(s->gic, irq), level); } -static void mpcore_priv_map_setup(mpcore_priv_state *s) +static void mpcore_priv_map_setup(ARM11MPCorePriveState *s) { int i; SysBusDevice *gicbusdev = SYS_BUS_DEVICE(s->gic); @@ -121,7 +121,7 @@ static void mpcore_priv_map_setup(mpcore_priv_state *s) static int mpcore_priv_init(SysBusDevice *dev) { - mpcore_priv_state *s = FROM_SYSBUS(mpcore_priv_state, dev); + ARM11MPCorePriveState *s = FROM_SYSBUS(ARM11MPCorePriveState, dev); s->gic = qdev_create(NULL, "arm_gic"); qdev_prop_set_uint32(s->gic, "num-cpu", s->num_cpu); @@ -230,7 +230,7 @@ static const TypeInfo mpcore_rirq_info = { }; static Property mpcore_priv_properties[] = { - DEFINE_PROP_UINT32("num-cpu", mpcore_priv_state, num_cpu, 1), + DEFINE_PROP_UINT32("num-cpu", ARM11MPCorePriveState, num_cpu, 1), /* The ARM11 MPCORE TRM says the on-chip controller may have * anything from 0 to 224 external interrupt IRQ lines (with another * 32 internal). We default to 32+32, which is the number provided by @@ -239,7 +239,7 @@ static Property mpcore_priv_properties[] = { * appropriately. Some Linux kernels may not boot if the hardware * has more IRQ lines than the kernel expects. */ - DEFINE_PROP_UINT32("num-irq", mpcore_priv_state, num_irq, 64), + DEFINE_PROP_UINT32("num-irq", ARM11MPCorePriveState, num_irq, 64), DEFINE_PROP_END_OF_LIST(), }; @@ -255,7 +255,7 @@ static void mpcore_priv_class_init(ObjectClass *klass, void *data) static const TypeInfo mpcore_priv_info = { .name = "arm11mpcore_priv", .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(mpcore_priv_state), + .instance_size = sizeof(ARM11MPCorePriveState), .class_init = mpcore_priv_class_init, };