diff mbox

[U-Boot,v2,03/22] armv7: start.S: provide a hook for saving boot params

Message ID 1305472900-4004-4-git-send-email-aneesh@ti.com
State Changes Requested
Headers show

Commit Message

Aneesh V May 15, 2011, 3:21 p.m. UTC
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 <aneesh@ti.com>
---
 arch/arm/cpu/armv7/cpu.c   |    7 +++++++
 arch/arm/cpu/armv7/start.S |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

Comments

Wolfgang Denk May 15, 2011, 7:10 p.m. UTC | #1
Dear Aneesh V,

In message <1305472900-4004-4-git-send-email-aneesh@ti.com> you wrote:
> 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 <aneesh@ti.com>

As is, this is dead code.  Please squash with next patch that uses
this.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 5c69d04..1c9e297 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -36,6 +36,13 @@ 
 #include <asm/system.h>
 #include <asm/armv7.h>
 
+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)
 {
 	/*
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 13e2d44..e6e05e9 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -119,6 +119,7 @@  IRQ_STACK_START_IN:
  */
 
 reset:
+	bl	save_boot_params
 	/*
 	 * set the cpu to SVC32 mode
 	 */