diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-07-20 15:17:14 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:38 -0400 |
commit | 9f4e1e94bb790cd85eb9904a78b396b512e0ce0b (patch) | |
tree | 0af25f49d5a2b7f9cf73bd41bdd72e38d9bad572 /board/lge/sniper | |
parent | 169ecb4a83c86dba7d19442de05310f0c068f0d1 (diff) | |
download | u-boot-imx-9f4e1e94bb790cd85eb9904a78b396b512e0ce0b.zip u-boot-imx-9f4e1e94bb790cd85eb9904a78b396b512e0ce0b.tar.gz u-boot-imx-9f4e1e94bb790cd85eb9904a78b396b512e0ce0b.tar.bz2 |
sniper: Pass serial number through ATAG
Now that the serial number is correctly defined, we can pass it to the kernel
using the (legacy) ATAG method. It will be automatically passed via device-tree
when enabled.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/lge/sniper')
-rw-r--r-- | board/lge/sniper/sniper.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/lge/sniper/sniper.c b/board/lge/sniper/sniper.c index f26855d..b211528 100644 --- a/board/lge/sniper/sniper.c +++ b/board/lge/sniper/sniper.c @@ -98,6 +98,24 @@ int misc_init_r(void) return 0; } +void get_board_serial(struct tag_serialnr *serialnr) +{ + char *serial_string; + unsigned long long serial; + + serial_string = getenv("serial#"); + + if (serial_string) { + serial = simple_strtoull(serial_string, NULL, 16); + + serialnr->high = (unsigned int) (serial >> 32); + serialnr->low = (unsigned int) (serial & 0xffffffff); + } else { + serialnr->high = 0; + serialnr->low = 0; + } +} + void set_muxconf_regs(void) { MUX_SNIPER(); |