[U-Boot] [PATCH 2/2] OMAP3 SPL: Provide weak omap_rev_string

Tom Rini trini at ti.com
Tue Oct 4 16:59:23 CEST 2011


We add an weak version of omap_rev_string in omap-common/spl.c
and while at it drop the omap3 version.  Move the prototype over
to <asm/omap_common.h> with the other SPL functions.

Signed-off-by: Tom Rini <trini at ti.com>
---
 arch/arm/cpu/armv7/omap-common/spl.c        |    8 ++++++++
 arch/arm/cpu/armv7/omap3/board.c            |    6 ------
 arch/arm/include/asm/arch-omap3/sys_proto.h |    1 -
 arch/arm/include/asm/arch-omap4/sys_proto.h |    1 -
 arch/arm/include/asm/omap_common.h          |    1 +
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index c76fea6..4db7a7b 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -161,3 +161,11 @@ void preloader_console_init(void)
 	omap_rev_string(rev_string_buffer);
 	printf("Texas Instruments %s\n", rev_string_buffer);
 }
+
+void __omap_rev_string(char *str)
+{
+	sprintf(str, "Revision detection unimplemented");
+}
+
+void omap_rev_string(char *str)
+	__attribute__((weak, alias("__omap_rev_string")));
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 1b3ef69..a9fdb4f 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -450,9 +450,3 @@ void enable_caches(void)
 	dcache_enable();
 }
 #endif
-
-void omap_rev_string(char *omap_rev_string)
-{
-	sprintf(omap_rev_string, "OMAP3, sorry revision detection" \
-		" unimplemented");
-}
diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h
index 7f2631e..1fc1c12 100644
--- a/arch/arm/include/asm/arch-omap3/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap3/sys_proto.h
@@ -72,5 +72,4 @@ void power_init_r(void);
 void dieid_num_r(void);
 void do_omap3_emu_romcode_call(u32 service_id, u32 parameters);
 void omap3_gp_romcode_call(u32 service_id, u32 parameter);
-void omap_rev_string(char *omap_rev_string);
 #endif
diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h b/arch/arm/include/asm/arch-omap4/sys_proto.h
index a81f8e5..1aacbb1 100644
--- a/arch/arm/include/asm/arch-omap4/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap4/sys_proto.h
@@ -43,7 +43,6 @@ void sr32(void *, u32, u32, u32);
 u32 wait_on_value(u32, u32, void *, u32);
 void sdelay(unsigned long);
 void set_pl310_ctrl_reg(u32 val);
-void omap_rev_string(char *omap4_rev_string);
 void setup_clocks_for_console(void);
 void prcm_init(void);
 void bypass_dpll(u32 *const base);
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 66d6b71..3f2f004 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -77,6 +77,7 @@ u32 omap_boot_mode(void);
 
 /* SPL common function s*/
 void spl_parse_image_header(const struct image_header *header);
+void omap_rev_string(char *omap_rev_string);
 
 /* NAND SPL functions */
 void spl_nand_load_image(void);
-- 
1.7.0.4



More information about the U-Boot mailing list