diff options
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/hwinit-common.c | 10 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/spl.c | 12 |
2 files changed, 8 insertions, 14 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c index da22f73162..49cdc3936e 100644 --- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c +++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c @@ -76,14 +76,14 @@ u32 cortex_rev(void) return rev; } -void omap_rev_string(char *omap_rev_string) +void omap_rev_string(void) { u32 omap_rev = omap_revision(); u32 omap_variant = (omap_rev & 0xFFFF0000) >> 16; u32 major_rev = (omap_rev & 0x00000F00) >> 8; u32 minor_rev = (omap_rev & 0x000000F0) >> 4; - sprintf(omap_rev_string, "OMAP%x ES%x.%x", omap_variant, major_rev, + printf("OMAP%x ES%x.%x\n", omap_variant, major_rev, minor_rev); } @@ -223,10 +223,8 @@ u32 get_device_type(void) */ int print_cpuinfo(void) { - char rev_string_buffer[50]; - - omap_rev_string(rev_string_buffer); - printf("CPU : %s\n", rev_string_buffer); + puts("CPU : "); + omap_rev_string(); return 0; } diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index 74fea4fa50..9c1f7e3eda 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -35,6 +35,7 @@ #include <i2c.h> #include <image.h> #include <malloc.h> +#include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; @@ -154,7 +155,6 @@ void board_init_r(gd_t *id, ulong dummy) void preloader_console_init(void) { const char *u_boot_rev = U_BOOT_VERSION; - char rev_string_buffer[50]; gd = &gdata; gd->bd = &bdata; @@ -170,14 +170,10 @@ void preloader_console_init(void) printf("\nU-Boot SPL %s (%s - %s)\n", u_boot_rev, U_BOOT_DATE, U_BOOT_TIME); - omap_rev_string(rev_string_buffer); - printf("Texas Instruments %s\n", rev_string_buffer); + omap_rev_string(); } -void __omap_rev_string(char *str) +void __weak omap_rev_string() { - sprintf(str, "Revision detection unimplemented"); + printf("Texas Instruments Revision detection unimplemented\n"); } - -void omap_rev_string(char *str) - __attribute__((weak, alias("__omap_rev_string"))); |