[U-Boot] [PATCH v3 6/7] omap_rev_string: output to stdout
Tom Rini
tom.rini at gmail.com
Fri Jan 13 17:58:52 CET 2012
On Fri, Jan 13, 2012 at 9:31 AM, Tom Rini <tom.rini at gmail.com> wrote:
> On Wed, Jan 4, 2012 at 6:26 PM, Andreas Müller <schnitzeltony at gmx.de> wrote:
>> * avoid potential buffer overflows
>> * allow SPL-build not to output "Texas Instruments Revision detection unimplemented"
>>
>> Signed-off-by: Andreas Müller <schnitzeltony at gmx.de>
>> ---
>> arch/arm/cpu/armv7/omap-common/hwinit-common.c | 10 ++++------
>> arch/arm/cpu/armv7/omap-common/spl.c | 10 ++++------
>> arch/arm/include/asm/arch-omap4/sys_proto.h | 2 +-
>> arch/arm/include/asm/arch-omap5/sys_proto.h | 2 +-
>> arch/arm/include/asm/omap_common.h | 2 +-
>> 5 files changed, 11 insertions(+), 15 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
>> index f65705d..90ec44d 100644
>> --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
>> +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
>> @@ -104,14 +104,14 @@ u32 cortex_rev(void)
>> return rev;
>> }
>>
>> -void omap_rev_string(char *omap_rev_string)
>> +void omap_rev_string()
>
> I'm going to apply this, but globally fix this change, it should read
> 'void omap_rev_string(void)'
For clarity, I'm doing:
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index d23ea1f..49cdc39 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -76,7 +76,7 @@ u32 cortex_rev(void)
return rev;
}
-void omap_rev_string()
+void omap_rev_string(void)
{
u32 omap_rev = omap_revision();
u32 omap_variant = (omap_rev & 0xFFFF0000) >> 16;
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c
b/arch/arm/cpu/armv7/omap-common/spl.c
index fdce2dc..c9f85fe 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -172,10 +172,7 @@ void preloader_console_init(void)
omap_rev_string();
}
-void __omap_rev_string()
+void __weak omap_rev_string()
{
printf("Texas Instruments Revision detection unimplemented\n");
}
-
-void omap_rev_string()
- __attribute__((weak, alias("__omap_rev_string")));
diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h
b/arch/arm/include/asm/arch-omap4/sys_proto.h
index 7386adf..b8dbc2c 100644
--- a/arch/arm/include/asm/arch-omap4/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap4/sys_proto.h
@@ -42,7 +42,7 @@ 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();
+void omap_rev_string(void);
void setup_clocks_for_console(void);
void prcm_init(void);
void bypass_dpll(u32 *const base);
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h
b/arch/arm/include/asm/arch-omap5/sys_proto.h
index fd1ba39..40a7c57 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -42,7 +42,7 @@ void set_muxconf_regs_non_essential(void);
void sr32(void *, u32, u32, u32);
u32 wait_on_value(u32, u32, void *, u32);
void sdelay(unsigned long);
-void omap_rev_string();
+void omap_rev_string(void);
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 d2b7cba..34bec45 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -91,7 +91,7 @@ u32 omap_boot_mode(void);
/* SPL common function s*/
void spl_parse_image_header(const struct image_header *header);
-void omap_rev_string();
+void omap_rev_string(void);
/* NAND SPL functions */
void spl_nand_load_image(void);
--
Tom
More information about the U-Boot
mailing list