From patchwork Fri Oct 31 13:53:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 39894 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9B30202FE for ; Fri, 31 Oct 2014 13:53:47 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d17sf745126eek.3 for ; Fri, 31 Oct 2014 06:53:47 -0700 (PDT) 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=7uMxpZ9i663bEUgYKBio8gWWsKv/1YoR4FrleO92t/w=; b=JWV2jy4j7+QC7MXrUZCJkVT0YlazVxqi7Dz+VWVwHRxYtPUkQrY2CEt7KLlNMSDqCC uqcfEoyRGc1uruaqx4g2jaOYrR/srucaiV2fnrED00xKNuNF+wQTFWeft2n94xlCQSEz sMX026Y5Gb78kGg6Kuv8uKYvROmqcSqOm3OjbbnhbqiJiwd8UoPPgtrUxz8CT0O5gbAX esP+MWnlrfOL+4asfXNiQ/NxVewySqu1GfjymdRRPX51Cip7oBfdnmONtht5E78qlzLk QkUa3jybu1qEmowpQ8wRHNp8//2aGi9u/4C3YjBW0zns/EXQcoKDuW3jTdbytVWJUhe0 P99Q== X-Gm-Message-State: ALoCoQlf1kE6V8wxEGRpsfbT76lGM+3l5D9hJCaApWC31TJx8i6nC83Z0ORZHb6Re6M0aukG1/CY X-Received: by 10.180.93.35 with SMTP id cr3mr673673wib.2.1414763627210; Fri, 31 Oct 2014 06:53:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.169 with SMTP id ld9ls487645lab.12.gmail; Fri, 31 Oct 2014 06:53:46 -0700 (PDT) X-Received: by 10.112.137.39 with SMTP id qf7mr26236707lbb.47.1414763626685; Fri, 31 Oct 2014 06:53:46 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id w2si16792503lag.73.2014.10.31.06.53.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:53:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id p9so464977lbv.0 for ; Fri, 31 Oct 2014 06:53:46 -0700 (PDT) X-Received: by 10.152.87.98 with SMTP id w2mr26106720laz.27.1414763626564; Fri, 31 Oct 2014 06:53:46 -0700 (PDT) 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.84.229 with SMTP id c5csp205522lbz; Fri, 31 Oct 2014 06:53:45 -0700 (PDT) X-Received: by 10.180.212.110 with SMTP id nj14mr4052146wic.45.1414763625815; Fri, 31 Oct 2014 06:53:45 -0700 (PDT) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com. [74.125.82.49]) by mx.google.com with ESMTPS id c7si14343093wjy.9.2014.10.31.06.53.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.49 as permitted sender) client-ip=74.125.82.49; Received: by mail-wg0-f49.google.com with SMTP id x13so6536415wgg.22 for ; Fri, 31 Oct 2014 06:53:45 -0700 (PDT) X-Received: by 10.194.92.42 with SMTP id cj10mr18682160wjb.6.1414763625593; Fri, 31 Oct 2014 06:53:45 -0700 (PDT) Received: from midway01-04-00.lavalab ([88.98.47.97]) by mx.google.com with ESMTPSA id w13sm12167570wjq.29.2014.10.31.06.53.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 06:53:44 -0700 (PDT) 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 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 v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb Date: Fri, 31 Oct 2014 13:53:27 +0000 Message-Id: <1414763612-4939-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1414763612-4939-1-git-send-email-eric.auger@linaro.org> References: <1414763612-4939-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.217.169 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 --- v2 -> v3: load_dtb renamed into arm_load_dtb Conflicts: hw/arm/boot.c --- hw/arm/boot.c | 12 ++++++------ include/hw/arm/arm.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index bffbea5..f5714ea 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); } } @@ -572,7 +572,7 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info) 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. */