From patchwork Thu Sep 1 17:36:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 3848 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 B49FA23FB0 for ; Thu, 1 Sep 2011 17:36:59 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id A9EC2A18635 for ; Thu, 1 Sep 2011 17:36:59 +0000 (UTC) Received: by ewy28 with SMTP id 28so1655744ewy.11 for ; Thu, 01 Sep 2011 10:36:59 -0700 (PDT) Received: by 10.223.24.21 with SMTP id t21mr156667fab.24.1314898619387; Thu, 01 Sep 2011 10:36:59 -0700 (PDT) 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.152.11.8 with SMTP id m8cs60764lab; Thu, 1 Sep 2011 10:36:59 -0700 (PDT) Received: by 10.216.230.194 with SMTP id j44mr107497weq.28.1314898617012; Thu, 01 Sep 2011 10:36:57 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id l1si728827wed.25.2011.09.01.10.36.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Sep 2011 10:36:56 -0700 (PDT) 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 1QzBCA-0000Xp-0p; Thu, 01 Sep 2011 18:36:54 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Avi Kivity Subject: [PATCH 1/2] hw/arm11mpcore: Clean up to avoid using sysbus_mmio_init_cb2 Date: Thu, 1 Sep 2011 18:36:52 +0100 Message-Id: <1314898613-2066-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1314898613-2066-1-git-send-email-peter.maydell@linaro.org> References: <1314898613-2066-1-git-send-email-peter.maydell@linaro.org> Clean up the initialisation of the realview_mpcore device to avoid using sysbus_init_mmio_cb2(): we can pass through the MemoryRegion of the private arm11mpcore_priv device directly now. Signed-off-by: Peter Maydell --- hw/arm11mpcore.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/hw/arm11mpcore.c b/hw/arm11mpcore.c index 7d60ef6..974a0d8 100644 --- a/hw/arm11mpcore.c +++ b/hw/arm11mpcore.c @@ -48,17 +48,6 @@ static void mpcore_rirq_set_irq(void *opaque, int irq, int level) } } -static void mpcore_rirq_map(SysBusDevice *dev, target_phys_addr_t base) -{ - mpcore_rirq_state *s = FROM_SYSBUS(mpcore_rirq_state, dev); - sysbus_mmio_map(s->priv, 0, base); -} - -static void mpcore_rirq_unmap(SysBusDevice *dev, target_phys_addr_t base) -{ - /* nothing to do */ -} - static int realview_mpcore_init(SysBusDevice *dev) { mpcore_rirq_state *s = FROM_SYSBUS(mpcore_rirq_state, dev); @@ -84,7 +73,7 @@ static int realview_mpcore_init(SysBusDevice *dev) } } qdev_init_gpio_in(&dev->qdev, mpcore_rirq_set_irq, 64); - sysbus_init_mmio_cb2(dev, mpcore_rirq_map, mpcore_rirq_unmap); + sysbus_init_mmio_region(dev, sysbus_mmio_get_region(s->priv, 0)); return 0; }