From patchwork Thu Dec 11 23:29:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 42160 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8744626666 for ; Thu, 11 Dec 2014 23:31:17 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf4464012eek.10 for ; Thu, 11 Dec 2014 15:31:16 -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=Hy4QaDuApn+orRUant9yJ6q/h9Yf5YTElQG0KMEnNuI=; b=fm/WkCKRVYAhaUXrYob8vFc2JIsghxrQVIP4T4O1UPbWDP9NMZDKCK9fQYrwH98whP zb/VY7eAW5iPurr0Z7mUi5MrkPfS/fPT7JwVhFlMKE1eH/WJL5dKZQ9cJ9cVXx7w6GgY CCdDuiF3tUpTvDXio1oDxFnx1qn5p0mv2Wxm0EvSKA/HZhnkqDravytSF4qWxUsRNT6s K+7QP3eo9Sv3d603iYy28StO//565Zgns8hBYPwZKEGeOWpaUdXa/syASu05xezDk6Rx 0aLoMo3A8xm4gMCGc5Ww8a+yuoPw4S71b579A3RZT1/ga+0x2/ljGrRaHEblUJe8liZz xXNw== X-Gm-Message-State: ALoCoQl/1yK/plklvesSLADYoVcKvN4SfckmEzOzPYdX+VWv2hBTEaGfxiwNxcjBdzbeWkn8GgAd X-Received: by 10.152.42.196 with SMTP id q4mr16213lal.6.1418340676361; Thu, 11 Dec 2014 15:31:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.9 with SMTP id o9ls379665lao.83.gmail; Thu, 11 Dec 2014 15:31:16 -0800 (PST) X-Received: by 10.112.148.73 with SMTP id tq9mr12446521lbb.37.1418340675987; Thu, 11 Dec 2014 15:31:15 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id i7si2788486lbc.8.2014.12.11.15.31.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Dec 2014 15:31:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id u10so5042539lbd.31 for ; Thu, 11 Dec 2014 15:31:15 -0800 (PST) X-Received: by 10.152.45.41 with SMTP id j9mr12611584lam.59.1418340675900; Thu, 11 Dec 2014 15:31:15 -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 ru5csp685992lbb; Thu, 11 Dec 2014 15:31:15 -0800 (PST) X-Received: by 10.224.54.2 with SMTP id o2mr25077641qag.34.1418340674561; Thu, 11 Dec 2014 15:31:14 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id m10si3157883qas.94.2014.12.11.15.31.13 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 11 Dec 2014 15:31:14 -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]:54641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzDCT-0005Df-IU for patch@linaro.org; Thu, 11 Dec 2014 18:31:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzDBE-0003td-1h for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:30:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzDB7-0000jL-Ts for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:29:55 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:33820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzDB7-0000j2-Ob for qemu-devel@nongnu.org; Thu, 11 Dec 2014 18:29:49 -0500 Received: by mail-pa0-f48.google.com with SMTP id rd3so6003383pab.7 for ; Thu, 11 Dec 2014 15:29:49 -0800 (PST) X-Received: by 10.66.227.41 with SMTP id rx9mr21218550pac.153.1418340589138; Thu, 11 Dec 2014 15:29:49 -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 ip1sm2362908pbc.0.2014.12.11.15.29.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 11 Dec 2014 15:29:48 -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: Thu, 11 Dec 2014 17:29:19 -0600 Message-Id: <1418340569-30519-6-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418340569-30519-1-git-send-email-greg.bellows@linaro.org> References: <1418340569-30519-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.48 Cc: Greg Bellows Subject: [Qemu-devel] [PATCH v2 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.217.172 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