From patchwork Mon Dec 15 18:51:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 42279 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9BFF2456A for ; Mon, 15 Dec 2014 18:55:48 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf3955951wiw.8 for ; Mon, 15 Dec 2014 10:55:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=RWNXIb3xnp9ecfFzjwcqJ5w2eGJMFTLFOeDeHsGvvMY=; b=HpCBtgyp3TnYwhhnEST1u/ER2ZQ9i1yn5w+d4TGa6AKQos20EdIlm3eJCQR1jysVFs CFIZK4QyAW+e9x7feS8JHJHSbALyOmxX4QcsEhEUMDH1PZ4oDc0Yw0wXvZQ5uDVrOllY gIzU7BlR9lFFIXMGLsgKFYfOMp/w09kz0a2KvfY4zsfMmFS7BaKZktleq35wvS3RFp8k zDfjOpBUhdXDoe+z4d+TatxjaDce8gfgFi8nJHthYwxJ5oWG6yY3vc+xhcxkqXQFmeoj wr9aRxT0Ra/FZEd70CPFxnqNp0FzcdY4ql7rf26MEeO/oMng0QOq3u7kaqJg78T2BlWg KL8A== X-Gm-Message-State: ALoCoQmbqv4h2ki/5xquvoXilDROVze3Z70pK3ixtvxKpSCKh4rLVtextBu3XG/D/xFk7GuV/5l2 X-Received: by 10.112.130.8 with SMTP id oa8mr561786lbb.11.1418669748036; Mon, 15 Dec 2014 10:55:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.137 with SMTP id 9ls183049lau.26.gmail; Mon, 15 Dec 2014 10:55:47 -0800 (PST) X-Received: by 10.112.172.162 with SMTP id bd2mr29609230lbc.87.1418669747625; Mon, 15 Dec 2014 10:55:47 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id b8si11336207lbv.37.2014.12.15.10.55.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:55:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so9438106lbd.20 for ; Mon, 15 Dec 2014 10:55:47 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr31353483lbo.32.1418669747462; Mon, 15 Dec 2014 10:55:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp809428lbb; Mon, 15 Dec 2014 10:55:46 -0800 (PST) X-Received: by 10.224.122.131 with SMTP id l3mr7228757qar.10.1418669746090; Mon, 15 Dec 2014 10:55:46 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 6si11577075qaw.77.2014.12.15.10.55.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:55:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:41477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ao5-0006gP-5G for patch@linaro.org; Mon, 15 Dec 2014 13:55:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ak8-0000Mm-Cp for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0ak2-0005sB-F2 for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:40 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:63502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ak2-0005s0-2I for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:34 -0500 Received: by mail-pa0-f47.google.com with SMTP id kq14so12394780pab.20 for ; Mon, 15 Dec 2014 10:51:33 -0800 (PST) X-Received: by 10.68.131.163 with SMTP id on3mr53548566pbb.169.1418669493474; Mon, 15 Dec 2014 10:51:33 -0800 (PST) Received: from gbellows-linaro.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com. [67.52.129.61]) by mx.google.com with ESMTPSA id bq7sm9972513pdb.50.2014.12.15.10.51.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:51:32 -0800 (PST) From: Greg Bellows To: qemu-devel@nongnu.org, serge.fdrv@gmail.com, edgar.iglesias@gmail.com, aggelerf@ethz.ch, peter.maydell@linaro.org Date: Mon, 15 Dec 2014 12:51:07 -0600 Message-Id: <1418669479-23908-4-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418669479-23908-1-git-send-email-greg.bellows@linaro.org> References: <1418669479-23908-1-git-send-email-greg.bellows@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.47 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH v3 03/15] target-arm: Switch to common vexpress machine init 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: greg.bellows@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Switched the Vexpress machine initialization to use the common function with the machine pointer to board info. Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell --- hw/arm/vexpress.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 8f22696..a03cb52 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -532,9 +532,10 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name, return OBJECT_CHECK(pflash_t, (dev), "cfi.pflash01"); } -static void vexpress_common_init(VEDBoardInfo *daughterboard, - MachineState *machine) +static void vexpress_common_init(MachineState *machine) { + VexpressMachineClass *vmc = VEXPRESS_MACHINE_GET_CLASS(machine); + VEDBoardInfo *daughterboard = vmc->daughterboard;; DeviceState *dev, *sysctl, *pl041; qemu_irq pic[64]; uint32_t sys_id; @@ -700,30 +701,13 @@ static void vexpress_common_init(VEDBoardInfo *daughterboard, arm_load_kernel(ARM_CPU(first_cpu), &daughterboard->bootinfo); } -static void vexpress_init(MachineState *machine) -{ - VexpressMachineClass *vmc = VEXPRESS_MACHINE_GET_CLASS(machine); - - vexpress_common_init(vmc->daughterboard, machine); -} - -static void vexpress_a9_init(MachineState *machine) -{ - vexpress_common_init(&a9_daughterboard, machine); -} - -static void vexpress_a15_init(MachineState *machine) -{ - vexpress_common_init(&a15_daughterboard, machine); -} - static void vexpress_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); mc->name = TYPE_VEXPRESS_MACHINE; mc->desc = "ARM Versatile Express"; - mc->init = vexpress_init; + mc->init = vexpress_common_init; mc->block_default_type = IF_SCSI; mc->max_cpus = 4; } @@ -735,7 +719,6 @@ static void vexpress_a9_class_init(ObjectClass *oc, void *data) mc->name = TYPE_VEXPRESS_A9_MACHINE; mc->desc = "ARM Versatile Express for Cortex-A9"; - mc->init = vexpress_a9_init; vmc->daughterboard = &a9_daughterboard;; } @@ -747,7 +730,6 @@ static void vexpress_a15_class_init(ObjectClass *oc, void *data) mc->name = TYPE_VEXPRESS_A15_MACHINE; mc->desc = "ARM Versatile Express for Cortex-A15"; - mc->init = vexpress_a15_init; vmc->daughterboard = &a15_daughterboard; }