diff options
Diffstat (limited to 'board')
| -rw-r--r-- | board/kontron/sl-mx6ul/Kconfig | 2 | ||||
| -rw-r--r-- | board/kontron/sl-mx6ul/sl-mx6ul.c | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/board/kontron/sl-mx6ul/Kconfig b/board/kontron/sl-mx6ul/Kconfig index 7a4ffbed289..a6d3fa49778 100644 --- a/board/kontron/sl-mx6ul/Kconfig +++ b/board/kontron/sl-mx6ul/Kconfig @@ -9,4 +9,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kontron-sl-mx6ul" +source "board/kontron/common/Kconfig" + endif diff --git a/board/kontron/sl-mx6ul/sl-mx6ul.c b/board/kontron/sl-mx6ul/sl-mx6ul.c index 65f9b75c1a0..9dda8822ef9 100644 --- a/board/kontron/sl-mx6ul/sl-mx6ul.c +++ b/board/kontron/sl-mx6ul/sl-mx6ul.c @@ -14,8 +14,37 @@ #include "sl-mx6ul-common.h" +#include "../common/hw-uid.h" + DECLARE_GLOBAL_DATA_PTR; +#if IS_ENABLED(CONFIG_KONTRON_HW_UID) + +struct uid_otp_loc uid_otp_locations[] = { + { + .addr = (u32 *)(OCOTP_BASE_ADDR + 0x670), + .len = 1, + .format = UID_OTP_FORMAT_DEC, + .desc = "BOARD" + }, + { + .addr = (u32 *)(OCOTP_BASE_ADDR + 0x660), + .len = 1, + .format = UID_OTP_FORMAT_DEC, + .desc = "SOM" + }, +#if IS_ENABLED(CONFIG_KONTRON_HW_UID_USE_SOC_FALLBACK) + { + .addr = (u32 *)(OCOTP_BASE_ADDR + 0x410), + .len = 2, + .format = UID_OTP_FORMAT_HEX, + .desc = "SOC" + } +#endif +}; + +#endif /* CONFIG_KONTRON_HW_UID */ + int dram_init(void) { gd->ram_size = imx_ddr_size(); @@ -91,6 +120,9 @@ int board_init(void) int board_late_init(void) { + if (IS_ENABLED(CONFIG_KONTRON_HW_UID)) + get_serial_number(uid_otp_locations, ARRAY_SIZE(uid_otp_locations)); + if (is_boot_from_usb()) { env_set("bootdelay", "0"); env_set("bootcmd", "fastboot 0"); |
