From patchwork Sun Nov 30 18:19:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 41718 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D25824001 for ; Sun, 30 Nov 2014 18:20:01 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf5871528wiv.1 for ; Sun, 30 Nov 2014 10:20:00 -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:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=sesJAv0d5hFX3jG7Ih07YafUyA8zZ5eLn4u4AbbjQ/0=; b=M2G+eC5ek45smkEi+zJJcKUTI/7qdINbCw9rw+X9f+5XFXGLisd263CSPAcww63wKY /iiyfyTxBnqm4iNVsUvlP6cWTeYnz79Ut2HKiOQZZvvCmDcTX5EYhms4pCytADSEz+am uXjhgjVWViUjnlyXw6S/+40x3RbSbC/jIgvRXqf1iEXTh5TPQ0WmHpjR1ppnABiOOKmu plPZt4FaevQ0Ep9tkLlkmVUdFNUzafDz+qjfDd4FBJQykvRQW3iX11EK7OLcWqJ5+FGT 1P1UQgS4IhBlgwmbu5Tu53ZDvtxvHCfC0yHJwk4HlB8RQ2f/GTd2t+REQljtCRzoIFQb meKw== X-Gm-Message-State: ALoCoQlRes8RI7fqcZmSdDkP4eVoOFaNoXgz/kABYyr9sv0gcgbv//1ctq9VsPUDQSYXyWTKWK4T X-Received: by 10.180.189.116 with SMTP id gh20mr12649688wic.2.1417371600940; Sun, 30 Nov 2014 10:20:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.227 with SMTP id e3ls1115482laa.69.gmail; Sun, 30 Nov 2014 10:20:00 -0800 (PST) X-Received: by 10.112.156.138 with SMTP id we10mr52603768lbb.88.1417371600777; Sun, 30 Nov 2014 10:20:00 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id kz1si15630059lbc.63.2014.11.30.10.20.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id ge10so7709136lab.17 for ; Sun, 30 Nov 2014 10:20:00 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr53252066laa.71.1417371600162; Sun, 30 Nov 2014 10:20:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp170824lbc; Sun, 30 Nov 2014 10:19:59 -0800 (PST) X-Received: by 10.180.91.36 with SMTP id cb4mr67799967wib.30.1417371599406; Sun, 30 Nov 2014 10:19:59 -0800 (PST) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com. [74.125.82.54]) by mx.google.com with ESMTPS id bj4si26569850wjc.172.2014.11.30.10.19.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:19:59 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.54 as permitted sender) client-ip=74.125.82.54; Received: by mail-wg0-f54.google.com with SMTP id l2so12439153wgh.27 for ; Sun, 30 Nov 2014 10:19:59 -0800 (PST) X-Received: by 10.194.109.201 with SMTP id hu9mr62195289wjb.45.1417371599145; Sun, 30 Nov 2014 10:19:59 -0800 (PST) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id ec2sm25092772wib.23.2014.11.30.10.19.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 30 Nov 2014 10:19:58 -0800 (PST) From: Eric Auger To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, agraf@suse.de, pbonzini@redhat.com, kim.phillips@freescale.com, a.rigo@virtualopensystems.com, manish.jaggi@caviumnetworks.com, joel.schopp@amd.com, zhaoshenglong@huawei.com, ard.biesheuvel@linaro.org Cc: eric.auger@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, alex.williamson@redhat.com, peter.maydell@linaro.org, will.deacon@arm.com, Bharat.Bhushan@freescale.com, stuart.yoder@freescale.com, a.motakis@virtualopensystems.com Subject: [PATCH v5 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb Date: Sun, 30 Nov 2014 18:19:25 +0000 Message-Id: <1417371570-11789-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1417371570-11789-1-git-send-email-eric.auger@linaro.org> References: <1417371570-11789-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@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.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger --- v4 -> v5: s/load_dtb/arm_load_dtb in one comment v2 -> v3: load_dtb renamed into arm_load_dtb Conflicts: hw/arm/boot.c --- hw/arm/boot.c | 16 ++++++++-------- include/hw/arm/arm.h | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 0014c34..9997bea 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -313,7 +313,7 @@ static void set_kernel_args_old(const struct arm_boot_info *info) } /** - * load_dtb() - load a device tree binary image into memory + * arm_load_dtb() - load a device tree binary image into memory * @addr: the address to load the image at * @binfo: struct describing the boot environment * @addr_limit: upper limit of the available memory area at @addr @@ -330,8 +330,8 @@ static void set_kernel_args_old(const struct arm_boot_info *info) * 0 if the image size exceeds the limit, * -1 on errors. */ -static int load_dtb(hwaddr addr, const struct arm_boot_info *binfo, - hwaddr addr_limit) +int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo, + hwaddr addr_limit) { void *fdt = NULL; int size, rc; @@ -504,7 +504,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) /* If we have a device tree blob, but no kernel to supply it to, * copy it to the base of RAM for a bootloader to pick up. */ - if (load_dtb(info->loader_start, info, 0) < 0) { + if (arm_load_dtb(info->loader_start, info, 0) < 0) { exit(1); } } @@ -566,13 +566,13 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) */ if (elf_low_addr > info->loader_start || elf_high_addr < info->loader_start) { - /* Pass elf_low_addr as address limit to load_dtb if it may be - * pointing into RAM, otherwise pass '0' (no limit) + /* Pass elf_low_addr as address limit to arm_load_dtb if it may + * be pointing into RAM, otherwise pass '0' (no limit) */ if (elf_low_addr < info->loader_start) { elf_low_addr = 0; } - if (load_dtb(info->loader_start, info, elf_low_addr) < 0) { + if (arm_load_dtb(info->loader_start, info, elf_low_addr) < 0) { exit(1); } } @@ -637,7 +637,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) */ hwaddr dtb_start = QEMU_ALIGN_UP(info->initrd_start + initrd_size, 4096); - if (load_dtb(dtb_start, info, 0) < 0) { + if (arm_load_dtb(dtb_start, info, 0) < 0) { exit(1); } fixupcontext[FIXUP_ARGPTR] = dtb_start; diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h index cefc9e6..5fdae7b 100644 --- a/include/hw/arm/arm.h +++ b/include/hw/arm/arm.h @@ -68,6 +68,8 @@ struct arm_boot_info { hwaddr entry; }; void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info); +int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo, + hwaddr addr_limit); /* Multiplication factor to convert from system clock ticks to qemu timer ticks. */