From patchwork Thu Feb 9 20:28:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 6731 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 51E6723EAE for ; Thu, 9 Feb 2012 20:28:22 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1B91CA18668 for ; Thu, 9 Feb 2012 20:28:22 +0000 (UTC) Received: by iabz7 with SMTP id z7so4052054iab.11 for ; Thu, 09 Feb 2012 12:28:21 -0800 (PST) Received: by 10.50.156.133 with SMTP id we5mr31552158igb.12.1328819301025; Thu, 09 Feb 2012 12:28:21 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.12.131 with SMTP id x3cs53251ibx; Thu, 9 Feb 2012 12:28:20 -0800 (PST) Received: by 10.50.203.98 with SMTP id kp2mr6135357igc.5.1328819299419; Thu, 09 Feb 2012 12:28:19 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id ml7si3899755igc.69.2012.02.09.12.28.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Feb 2012 12:28:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RvabG-0000NU-LV; Thu, 09 Feb 2012 20:28:14 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 1/3] hw/arm_sysctl: Drop legacy init function Date: Thu, 9 Feb 2012 20:28:12 +0000 Message-Id: <1328819294-1427-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1328819294-1427-1-git-send-email-peter.maydell@linaro.org> References: <1328819294-1427-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnGyzYhJotzbAv+9v1ttnBI/mQmEH7qZK+0z6WE5FtxBgSsOLRTeSwypMemxnra4ri04AdC Drop the legacy init function arm_sysctl_init(), since it has no users left any more. This allows us to drop the awkward '1' from the actual device init function. Signed-off-by: Peter Maydell Acked-by: Andreas Färber --- hw/arm_sysctl.c | 16 ++-------------- hw/primecell.h | 3 --- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 9d25799..7754864 100644 --- a/hw/arm_sysctl.c +++ b/hw/arm_sysctl.c @@ -378,7 +378,7 @@ static void arm_sysctl_gpio_set(void *opaque, int line, int level) } } -static int arm_sysctl_init1(SysBusDevice *dev) +static int arm_sysctl_init(SysBusDevice *dev) { arm_sysctl_state *s = FROM_SYSBUS(arm_sysctl_state, dev); @@ -389,18 +389,6 @@ static int arm_sysctl_init1(SysBusDevice *dev) return 0; } -/* Legacy helper function. */ -void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id) -{ - DeviceState *dev; - - dev = qdev_create(NULL, "realview_sysctl"); - qdev_prop_set_uint32(dev, "sys_id", sys_id); - qdev_init_nofail(dev); - qdev_prop_set_uint32(dev, "proc_id", proc_id); - sysbus_mmio_map(sysbus_from_qdev(dev), 0, base); -} - static Property arm_sysctl_properties[] = { DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0), DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), @@ -412,7 +400,7 @@ static void arm_sysctl_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = arm_sysctl_init1; + k->init = arm_sysctl_init; dc->reset = arm_sysctl_reset; dc->vmsd = &vmstate_arm_sysctl; dc->props = arm_sysctl_properties; diff --git a/hw/primecell.h b/hw/primecell.h index de7d6f2..e709ad3 100644 --- a/hw/primecell.h +++ b/hw/primecell.h @@ -8,9 +8,6 @@ /* pl080.c */ void *pl080_init(uint32_t base, qemu_irq irq, int nchannels); -/* arm_sysctl.c */ -void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id); - /* arm_sysctl GPIO lines */ #define ARM_SYSCTL_GPIO_MMC_WPROT 0 #define ARM_SYSCTL_GPIO_MMC_CARDIN 1