From patchwork Mon Dec 15 23:09:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Bellows X-Patchwork-Id: 42296 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D351E26C6C for ; Mon, 15 Dec 2014 23:11:48 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf7929166lab.7 for ; Mon, 15 Dec 2014 15:11:47 -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=PvNk8vztphzcAyXH/2+uaqpjTGOnYEJlAG7ZYDzqdvk=; b=WTTSTxARgE356EPOiig6YUkX0dY/DZZUqek1ymzS4Wcb/9Wq8jik0LYQIZaUqRtriU FSMPDIhIJbw85X6ETg17qRQZEEBP22ddkchnlZItF/3shiIGS1hwgRSuySf0dl+PMQMs o/VyBkwP33lGd877g6gLlSNs9bUrcOquPVDDx8pH6c+pOGyAPiR92ayxxa8qU2HuMoKQ h/OoL6gGlqpq5UrFjANlaxZLZ9y+8R84FrZKGx6wpagcfk9u18+L3sCAJI5rr4FnFSNR 6mzVxNHG3dHpOVsCreQJ8klmoLvdQbFDh+kyh+5yfQ2i2uC89dan9v7M0wWPmfCiQBov AWRg== X-Gm-Message-State: ALoCoQlvP00r3mSgOtIfs6vPpJm15FZFztQRDXwkV8Q+SSiwYqKslAEafTgk6TsOq344kBet7Dk6 X-Received: by 10.194.178.163 with SMTP id cz3mr5131267wjc.1.1418685107741; Mon, 15 Dec 2014 15:11:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls826404lac.50.gmail; Mon, 15 Dec 2014 15:11:47 -0800 (PST) X-Received: by 10.152.19.71 with SMTP id c7mr32752084lae.79.1418685107477; Mon, 15 Dec 2014 15:11:47 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id m1si11833834lam.44.2014.12.15.15.11.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 15:11:47 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id gd6so10478333lab.15 for ; Mon, 15 Dec 2014 15:11:47 -0800 (PST) X-Received: by 10.152.2.41 with SMTP id 9mr31848598lar.47.1418685107373; Mon, 15 Dec 2014 15:11: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 ru5csp866180lbb; Mon, 15 Dec 2014 15:11:46 -0800 (PST) X-Received: by 10.140.102.13 with SMTP id v13mr39258681qge.68.1418685105853; Mon, 15 Dec 2014 15:11:45 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id g1si12430632qaq.47.2014.12.15.15.11.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Dec 2014 15:11:45 -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]:42307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0eno-0004pK-P6 for patch@linaro.org; Mon, 15 Dec 2014 18:11:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0emO-0003X7-SZ for qemu-devel@nongnu.org; Mon, 15 Dec 2014 18:10:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0emI-0000ew-V1 for qemu-devel@nongnu.org; Mon, 15 Dec 2014 18:10:16 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:60966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0emI-0000en-QF for qemu-devel@nongnu.org; Mon, 15 Dec 2014 18:10:10 -0500 Received: by mail-pa0-f47.google.com with SMTP id kq14so12795071pab.20 for ; Mon, 15 Dec 2014 15:10:10 -0800 (PST) X-Received: by 10.68.241.130 with SMTP id wi2mr55349015pbc.89.1418685010417; Mon, 15 Dec 2014 15:10:10 -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 uq15sm10402467pab.8.2014.12.15.15.10.08 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 15:10:09 -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 17:09:42 -0600 Message-Id: <1418684992-8996-6-git-send-email-greg.bellows@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1418684992-8996-1-git-send-email-greg.bellows@linaro.org> References: <1418684992-8996-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 v4 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.42 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 8b05d47..c63c422 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