From patchwork Mon Dec 15 18:51:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 42274 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 19F4B2456A for ; Mon, 15 Dec 2014 18:53:03 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf7641803wgh.5 for ; Mon, 15 Dec 2014 10:53:02 -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=RHQOIUovd+WAmy/yCnOMA52mSMmSwrgRrQ1/QebQqBY=; b=DJdT5KfeAMKqmNbimp2bi1jVM1NP01M8i/+ppxzXZyBaU21JmTa1b09NlNT7PuY/L8 cJ4dQ+WhgvjHJ5hwAD3ySZadRj2hASLdv3KD6TonrqQai1mWXPkqayj7nfYYMYf4untB 1Nc63SZ0H0YgEUKSIJ3WbbfbRyujQkRZ/WfcJyvgcXfW/nSVvzea9hC2G10P+hyLnZUh kv8w4BhUF3GHcpSREHbdArWKPn7n0wZdX08HsZmZkndiXI0Mg5XdFa+cikBvBXPRoPXd 7+jceaFf6GbQrFObNrhSyyyOa9nXeOH4xe9pLGOIvUssM3XafgjeWrWQWK/nDUMgO/pm GCIw== X-Gm-Message-State: ALoCoQmvo8V9lcTXCF0jLcO+UxNt+3bUs9y9hIcIf10PtGnVKgRLiAkEN9Hdjob7KM76Q2eUx8X1 X-Received: by 10.180.189.116 with SMTP id gh20mr3065774wic.2.1418669582419; Mon, 15 Dec 2014 10:53:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.37 with SMTP id 5ls770136laz.81.gmail; Mon, 15 Dec 2014 10:53:02 -0800 (PST) X-Received: by 10.112.130.132 with SMTP id oe4mr31507595lbb.82.1418669582254; Mon, 15 Dec 2014 10:53:02 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id gl8si2271921lbc.60.2014.12.15.10.53.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pn19so10134158lab.9 for ; Mon, 15 Dec 2014 10:53:02 -0800 (PST) X-Received: by 10.152.27.8 with SMTP id p8mr14976366lag.69.1418669582134; Mon, 15 Dec 2014 10:53:02 -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 ru5csp808819lbb; Mon, 15 Dec 2014 10:52:59 -0800 (PST) X-Received: by 10.140.109.102 with SMTP id k93mr55735444qgf.83.1418669579070; Mon, 15 Dec 2014 10:52:59 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z76si11596148qge.57.2014.12.15.10.52.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:52:59 -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]:41454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0alN-0001ox-Rr for patch@linaro.org; Mon, 15 Dec 2014 13:52:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0akB-0000Tj-PI for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0ak5-0005tU-Sv for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:43 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:48857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ak5-0005tH-NT for qemu-devel@nongnu.org; Mon, 15 Dec 2014 13:51:37 -0500 Received: by mail-pd0-f175.google.com with SMTP id g10so10239621pdj.20 for ; Mon, 15 Dec 2014 10:51:37 -0800 (PST) X-Received: by 10.68.211.193 with SMTP id ne1mr54025805pbc.49.1418669497163; Mon, 15 Dec 2014 10:51:37 -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.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 10:51:36 -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:09 -0600 Message-Id: <1418669479-23908-6-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.192.175 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH v3 05/15] target-arm: Change vexpress daughterboard init arg 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.215.50 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 Change the Vexpress daughterboard initialization method to take a vexpress machine state pointer instead of the daughterboard struct pointer. The machine state now contains the daughterboard pointer. Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell --- hw/arm/vexpress.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 7b34f44..c82c32e 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -177,7 +177,7 @@ typedef struct { #define VEXPRESS_MACHINE_CLASS(klass) \ OBJECT_CLASS_CHECK(VexpressMachineClass, klass, TYPE_VEXPRESS_MACHINE) -typedef void DBoardInitFn(const VEDBoardInfo *daughterboard, +typedef void DBoardInitFn(const VexpressMachineState *machine, ram_addr_t ram_size, const char *cpu_model, qemu_irq *pic); @@ -252,7 +252,7 @@ static void init_cpus(const char *cpu_model, const char *privdev, } } -static void a9_daughterboard_init(const VEDBoardInfo *daughterboard, +static void a9_daughterboard_init(const VexpressMachineState *vms, ram_addr_t ram_size, const char *cpu_model, qemu_irq *pic) @@ -342,7 +342,7 @@ static VEDBoardInfo a9_daughterboard = { .init = a9_daughterboard_init, }; -static void a15_daughterboard_init(const VEDBoardInfo *daughterboard, +static void a15_daughterboard_init(const VexpressMachineState *vms, ram_addr_t ram_size, const char *cpu_model, qemu_irq *pic) @@ -535,6 +535,7 @@ static pflash_t *ve_pflash_cfi01_register(hwaddr base, const char *name, static void vexpress_common_init(MachineState *machine) { + VexpressMachineState *vms = VEXPRESS_MACHINE(machine); VexpressMachineClass *vmc = VEXPRESS_MACHINE_GET_CLASS(machine); VEDBoardInfo *daughterboard = vmc->daughterboard;; DeviceState *dev, *sysctl, *pl041; @@ -551,8 +552,7 @@ static void vexpress_common_init(MachineState *machine) const hwaddr *map = daughterboard->motherboard_map; int i; - daughterboard->init(daughterboard, machine->ram_size, machine->cpu_model, - pic); + daughterboard->init(vms, machine->ram_size, machine->cpu_model, pic); /* * If a bios file was provided, attempt to map it into memory