From patchwork Mon Feb 28 11:46:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aneesh V X-Patchwork-Id: 226 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:02 -0000 Delivered-To: patches@linaro.org Received: by 10.224.19.208 with SMTP id c16cs91643qab; Mon, 28 Feb 2011 03:46:28 -0800 (PST) Received: by 10.150.158.12 with SMTP id g12mr7127792ybe.48.1298893587903; Mon, 28 Feb 2011 03:46:27 -0800 (PST) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by mx.google.com with ESMTPS id a60si8028385yhd.128.2011.02.28.03.46.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 03:46:27 -0800 (PST) Received-SPF: pass (google.com: domain of aneesh@ti.com designates 198.47.26.152 as permitted sender) client-ip=198.47.26.152; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh@ti.com designates 198.47.26.152 as permitted sender) smtp.mail=aneesh@ti.com Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1SBkOn1023705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Feb 2011 05:46:26 -0600 Received: from localhost (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1SBkNDk011770; Mon, 28 Feb 2011 17:16:23 +0530 (IST) From: Aneesh V To: u-boot@lists.denx.de Cc: aneesh@ti.com, x-loader@googlegroups.com, patches@linaro.org, john.rigby@linaro.org Subject: [PATCH 04/22] armv7: start.S: provide a hook for saving boot params Date: Mon, 28 Feb 2011 17:16:13 +0530 Message-Id: <1298893591-17636-5-git-send-email-aneesh@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298893591-17636-1-git-send-email-aneesh@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> Provide a means by which u-boot/SPL can save parameters passed to it by ROM code or the pre-loader. A new function 'save_boot_params' has been defined and a default implentation provided. Please note that we do not have a stack yet. So, any implementation of this function should not use stack. Signed-off-by: Aneesh V --- arch/arm/cpu/armv7/cpu.c | 7 +++++++ arch/arm/cpu/armv7/start.S | 1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index a01e0d6..54533fc 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -41,6 +41,13 @@ static void cache_flush(void); +void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3) +{ +} + +void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) + __attribute__((weak, alias("save_boot_params_default"))); + int cleanup_before_linux(void) { unsigned int i; diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index cb4f92f..3618190 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -103,6 +103,7 @@ IRQ_STACK_START_IN: */ reset: + bl save_boot_params /* * set the cpu to SVC32 mode */