diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-08-27 19:37:11 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-22 14:17:21 -0400 |
commit | 9fd5401659c34b9b07f5d729ad35611b002830ff (patch) | |
tree | b51bdbfec1ce51d8c3c32e83633dd20ea5985b38 /board/ti | |
parent | 987a40d52ea617ee609fafcee5463274983d2827 (diff) | |
download | u-boot-imx-9fd5401659c34b9b07f5d729ad35611b002830ff.zip u-boot-imx-9fd5401659c34b9b07f5d729ad35611b002830ff.tar.gz u-boot-imx-9fd5401659c34b9b07f5d729ad35611b002830ff.tar.bz2 |
omap5: omap_die_id support
This introduces omap5 support for omap_die_id, which matches the common
omap_die_id definition. It replaces board-specific code to grab the die id bits.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/ti')
-rw-r--r-- | board/ti/dra7xx/evm.c | 7 | ||||
-rw-r--r-- | board/ti/omap5_uevm/evm.c | 12 |
2 files changed, 6 insertions, 13 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 890b603..d4f5078 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -57,16 +57,15 @@ int board_init(void) int board_late_init(void) { #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - u32 id[4]; + unsigned int die_id[4] = { 0 }; if (omap_revision() == DRA722_ES1_0) setenv("board_name", "dra72x"); else setenv("board_name", "dra7xx"); - id[0] = readl((*ctrl)->control_std_fuse_die_id_0); - id[1] = readl((*ctrl)->control_std_fuse_die_id_1); - usb_set_serial_num_from_die_id(id); + omap_die_id(die_id); + usb_set_serial_num_from_die_id(die_id); #endif return 0; } diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 659877c..0484087 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -189,20 +189,14 @@ static void enable_host_clocks(void) */ int misc_init_r(void) { - int reg; - u32 id[4]; + unsigned int die_id[4] = { 0 }; #ifdef CONFIG_PALMAS_POWER palmas_init_settings(); #endif - reg = DIE_ID_REG_BASE + DIE_ID_REG_OFFSET; - - id[0] = readl(reg); - id[1] = readl(reg + 0x8); - id[2] = readl(reg + 0xC); - id[3] = readl(reg + 0x10); - usb_fake_mac_from_die_id(id); + omap_die_id(die_id); + usb_fake_mac_from_die_id(die_id); return 0; } |