Since there is a common function to grab the serial number from the die id bits,
it makes sense have one to parse that serial number and feed it to the serial
ATAG.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
}
}
+void omap_die_id_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 omap_die_id_usbethaddr(void)
{
unsigned int die_id[4] = { 0 };
s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb);
void omap_die_id_serial(void);
+void omap_die_id_get_board_serial(struct tag_serialnr *serialnr);
void omap_die_id_usbethaddr(void);
void omap_die_id_display(void);
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;
- }
+ omap_die_id_get_board_serial(serialnr);
}
void reset_misc(void)