From: Patrick Delaunay Date: Wed, 27 Feb 2019 16:01:29 +0000 (+0100) Subject: stm32mp1: Replace OTP read by SHADOW read X-Git-Tag: v2019.07-rc1~27^2~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=17f1f9b17672bf6d3c9ce37f7cb370cd8b6132d1;p=oweals%2Fu-boot.git stm32mp1: Replace OTP read by SHADOW read Replace STM32_BSEC_OTP() by STM32_BSEC_SHADOW() to increase read performance. Signed-off-by: Patrice Chotard Signed-off-by: Patrick Delaunay --- diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index f39941edfc..7b4431c9c7 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -472,7 +472,7 @@ static int setup_mac_address(void) if (ret) return ret; - ret = misc_read(dev, BSEC_OTP_MAC * 4 + STM32_BSEC_OTP_OFFSET, + ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_MAC), otp, sizeof(otp)); if (ret < 0) return ret; @@ -510,7 +510,7 @@ static int setup_serial_number(void) if (ret) return ret; - ret = misc_read(dev, BSEC_OTP_SERIAL * 4 + STM32_BSEC_OTP_OFFSET, + ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_SERIAL), otp, sizeof(otp)); if (ret < 0) return ret;