|
@@ -15,6 +15,7 @@
|
|
|
#include <asm/arch/imx-rdc.h>
|
|
|
#include <asm/mach-imx/boot_mode.h>
|
|
|
#include <asm/arch/crm_regs.h>
|
|
|
+#include <asm/bootm.h>
|
|
|
#include <dm.h>
|
|
|
#include <env.h>
|
|
|
#include <imx_thermal.h>
|
|
@@ -337,10 +338,19 @@ int arch_cpu_init(void)
|
|
|
int arch_misc_init(void)
|
|
|
{
|
|
|
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
|
|
+ struct tag_serialnr serialnr;
|
|
|
+ char serial_string[0x20];
|
|
|
+
|
|
|
if (is_mx7d())
|
|
|
env_set("soc", "imx7d");
|
|
|
else
|
|
|
env_set("soc", "imx7s");
|
|
|
+
|
|
|
+ /* Set serial# standard environment variable based on OTP settings */
|
|
|
+ get_board_serial(&serialnr);
|
|
|
+ snprintf(serial_string, sizeof(serial_string), "0x%08x%08x",
|
|
|
+ serialnr.low, serialnr.high);
|
|
|
+ env_set("serial#", serial_string);
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_FSL_CAAM
|
|
@@ -351,7 +361,7 @@ int arch_misc_init(void)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#ifdef CONFIG_SERIAL_TAG
|
|
|
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
|
|
/*
|
|
|
* OCOTP_TESTER
|
|
|
* i.MX 7Solo Applications Processor Reference Manual, Rev. 0.1, 08/2016
|