diff options
author | Patrice Chotard <patrice.chotard@foss.st.com> | 2024-01-15 15:05:50 +0100 |
---|---|---|
committer | Patrice Chotard <patrice.chotard@foss.st.com> | 2024-01-19 14:37:50 +0100 |
commit | 9c2f5b8ad6ab28c2196bddedcd69cca954270a89 (patch) | |
tree | b5738100960cfd2953c3dbad2fe93663644e408d /arch/arm/mach-stm32mp/stm32mp1/cpu.c | |
parent | 1af148da848aa00fd605d726f6de6a0ff3dc3793 (diff) |
stm32mp: add setup_serial_number for stm32mp25
Add support of serial number for stm32mp25, gets from OTP with BSEC driver.
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Diffstat (limited to 'arch/arm/mach-stm32mp/stm32mp1/cpu.c')
-rw-r--r-- | arch/arm/mach-stm32mp/stm32mp1/cpu.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/arm/mach-stm32mp/stm32mp1/cpu.c b/arch/arm/mach-stm32mp/stm32mp1/cpu.c index 00fea7929b2..f84cb26fa56 100644 --- a/arch/arm/mach-stm32mp/stm32mp1/cpu.c +++ b/arch/arm/mach-stm32mp/stm32mp1/cpu.c @@ -336,33 +336,6 @@ __weak int setup_mac_address(void) return 0; } -static int setup_serial_number(void) -{ - char serial_string[25]; - u32 otp[3] = {0, 0, 0 }; - struct udevice *dev; - int ret; - - if (env_get("serial#")) - return 0; - - ret = uclass_get_device_by_driver(UCLASS_MISC, - DM_DRIVER_GET(stm32mp_bsec), - &dev); - if (ret) - return ret; - - ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_SERIAL), - otp, sizeof(otp)); - if (ret < 0) - return ret; - - sprintf(serial_string, "%08X%08X%08X", otp[0], otp[1], otp[2]); - env_set("serial#", serial_string); - - return 0; -} - __weak void stm32mp_misc_init(void) { } |