mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
sunxi: Pass serial number through ATAG
Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
0e6b7a2824
commit
9f85221135
2 changed files with 21 additions and 0 deletions
|
@ -480,6 +480,26 @@ int g_dnl_board_usb_cable_connected(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SERIAL_TAG
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MISC_INIT_R
|
||||
int misc_init_r(void)
|
||||
{
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#define CONFIG_SETUP_MEMORY_TAGS
|
||||
#define CONFIG_CMDLINE_TAG
|
||||
#define CONFIG_INITRD_TAG
|
||||
#define CONFIG_SERIAL_TAG
|
||||
|
||||
/* mmc config */
|
||||
#if !defined(CONFIG_UART0_PORT_F)
|
||||
|
|
Loading…
Reference in a new issue