diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-08-27 19:37:13 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-22 14:18:30 -0400 |
commit | 679f82c349473c894159795c14a7fc0a8db0cd43 (patch) | |
tree | e80d31f3c6dab9fad904bfc0524cb3058aaccf9b /arch/arm | |
parent | 07815eb9f3f742237085e3eda947e095926212b0 (diff) | |
download | u-boot-imx-679f82c349473c894159795c14a7fc0a8db0cd43.zip u-boot-imx-679f82c349473c894159795c14a7fc0a8db0cd43.tar.gz u-boot-imx-679f82c349473c894159795c14a7fc0a8db0cd43.tar.bz2 |
omap-common: Common function to display die id, replacing omap3-specific version
This introduces omap_die_id_display to display the full die id.
There is no need to store it in an environment variable, that no boot script
is using anyway.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/utils.c | 10 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/omap3/board.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/omap3/sys_info.c | 22 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-omap3/sys_proto.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/omap_common.h | 1 |
5 files changed, 12 insertions, 24 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/utils.c b/arch/arm/cpu/armv7/omap-common/utils.c index 28d0f86..dc5a169 100644 --- a/arch/arm/cpu/armv7/omap-common/utils.c +++ b/arch/arm/cpu/armv7/omap-common/utils.c @@ -83,3 +83,13 @@ void omap_die_id_usbethaddr(void) eth_setenv_enetaddr("usbethaddr", mac); } } + +void omap_die_id_display(void) +{ + unsigned int die_id[4] = { 0 }; + + omap_die_id(die_id); + + printf("OMAP die ID: %08x%08x%08x%08x", die_id[0], die_id[1], die_id[2], + die_id[3]); +} diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c index 8252b32..0c44ea5 100644 --- a/arch/arm/cpu/armv7/omap3/board.c +++ b/arch/arm/cpu/armv7/omap3/board.c @@ -214,7 +214,7 @@ void board_init_f(ulong dummy) */ int __weak misc_init_r(void) { - dieid_num_r(); + omap_die_id_display(); return 0; } diff --git a/arch/arm/cpu/armv7/omap3/sys_info.c b/arch/arm/cpu/armv7/omap3/sys_info.c index 497dc13..6818fab 100644 --- a/arch/arm/cpu/armv7/omap3/sys_info.c +++ b/arch/arm/cpu/armv7/omap3/sys_info.c @@ -52,28 +52,6 @@ void omap_die_id(unsigned int *die_id) die_id[3] = readl(&id_base->die_id_3); } -/***************************************************************** - * dieid_num_r(void) - read and set die ID - *****************************************************************/ -void dieid_num_r(void) -{ - char *uid_s, die_id[34]; - u32 id[4]; - - memset(die_id, 0, sizeof(die_id)); - - uid_s = getenv("dieid#"); - - if (uid_s == NULL) { - omap_die_id(id); - sprintf(die_id, "%08x%08x%08x%08x", id[0], id[1], id[2], id[3]); - setenv("dieid#", die_id); - uid_s = die_id; - } - - printf("Die ID #%s\n", uid_s); -} - /****************************************** * get_cpu_type(void) - extract cpu info ******************************************/ diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index a0809fc..24563c0 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -69,7 +69,6 @@ void sdelay(unsigned long); void make_cs1_contiguous(void); void omap_nand_switch_ecc(uint32_t, uint32_t); void power_init_r(void); -void dieid_num_r(void); void do_omap3_emu_romcode_call(u32 service_id, u32 parameters); void omap3_set_aux_cr_secure(u32 acr); u32 warm_reset(void); diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index 84522ea..8fd728a 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -605,6 +605,7 @@ s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb); void omap_die_id_serial(void); void omap_die_id_usbethaddr(void); +void omap_die_id_display(void); void recalibrate_iodelay(void); |