diff options
author | Dileep Katta <dileep.katta@linaro.org> | 2015-03-25 04:04:51 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-04-23 13:59:19 -0400 |
commit | f12467d1a5d299738c19faeae39d3f093ef67624 (patch) | |
tree | eb6a951054c17eae33915cfeb8db3bb63a0a0b90 /board/ti/dra7xx/evm.c | |
parent | be17d396ffd051703839b896f28cd8dfbb859772 (diff) |
ARM: DRA7: Set serial number environment variable
This patch populates serial number environment variable from
die_id_0 and die_id_1 register values for DRA7xx boards.
The function is added in omap common code so that this can be re-used.
Serial# environment variable will be useful to show correct
information in "fastboot devices" commands.
Ref:
http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=a6bcaaf67f6e4bcd97808f53d0ceb4b0c04d583c
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Dileep Katta <dileep.katta@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/ti/dra7xx/evm.c')
-rw-r--r-- | board/ti/dra7xx/evm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index c1019289ba..d4648558ec 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -93,10 +93,16 @@ int board_init(void) int board_late_init(void) { #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + u32 id[4]; + 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); #endif return 0; } |