PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/tools/u-boot/patches/u-boot-2011.03-rc1-0004-armv7-start.S-provide-a-hook-for-saving-boot-params.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 51 lines | 43 code | 8 blank | 0 comment | 0 complexity | cc66e9d3fec9a59bcad4b0dbe2047f44 MD5 | raw file
 1From 19eb02e3bb2e569b7269019eb0e116220daac23f Mon Sep 17 00:00:00 2001
 2From: Aneesh V <aneesh@ti.com>
 3Date: Thu, 17 Feb 2011 16:49:05 +0530
 4Subject: [PATCH 04/22] armv7: start.S: provide a hook for saving boot params
 5
 6Provide a means by which u-boot/SPL can save parameters passed
 7to it by ROM code or the pre-loader.
 8
 9A new function 'save_boot_params' has been defined and a default
10implentation provided. Please note that we do not have a stack yet.
11So, any implementation of this function should not use stack.
12
13Signed-off-by: Aneesh V <aneesh@ti.com>
14---
15 arch/arm/cpu/armv7/cpu.c   |    7 +++++++
16 arch/arm/cpu/armv7/start.S |    1 +
17 2 files changed, 8 insertions(+), 0 deletions(-)
18
19diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
20index a01e0d6..54533fc 100644
21--- a/arch/arm/cpu/armv7/cpu.c
22+++ b/arch/arm/cpu/armv7/cpu.c
23@@ -41,6 +41,13 @@
24 
25 static void cache_flush(void);
26 
27+void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
28+{
29+}
30+
31+void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
32+	__attribute__((weak, alias("save_boot_params_default")));
33+
34 int cleanup_before_linux(void)
35 {
36 	unsigned int i;
37diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
38index cb4f92f..3618190 100644
39--- a/arch/arm/cpu/armv7/start.S
40+++ b/arch/arm/cpu/armv7/start.S
41@@ -103,6 +103,7 @@ IRQ_STACK_START_IN:
42  */
43 
44 reset:
45+	bl	save_boot_params
46 	/*
47 	 * set the cpu to SVC32 mode
48 	 */
49-- 
501.7.2.3
51