From f12467d1a5d299738c19faeae39d3f093ef67624 Mon Sep 17 00:00:00 2001 From: Dileep Katta Date: Wed, 25 Mar 2015 04:04:51 +0530 Subject: 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 Signed-off-by: Dileep Katta Reviewed-by: Tom Rini --- board/ti/dra7xx/evm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'board/ti/dra7xx') diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index c101928..d464855 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; } -- cgit v1.1