@@ -239,6 +239,9 @@ int board_usb_phy_mode(int port)
int board_late_init(void)
{
struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
+ u64 serial_id = 0;
+ char serial_string[0x20];
+ int ret;
imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
@@ -250,5 +253,14 @@ int board_late_init(void)
*/
clrsetbits_le16(&wdog->wcr, 0, 0x10);
+ /* Set serial# standard environment variable based on OTP settings */
+ ret = warp7_get_serialid(&serial_id);
+ if (ret)
+ printf("error %d reading from serial# OTP fuse\n", ret);
+
+ snprintf(serial_string, sizeof(serial_string), "WaRP7-0x%016llx",
+ serial_id);
+ env_set("serial#", serial_string);
+
return 0;
}