[PATCH 05/10] arm: stm32mp: bsec: Do not skip .probe() for SPL

Alexandru Gagniuc mr.nuke.me at gmail.com
Thu Aug 26 23:42:04 CEST 2021


stm32mp_bsec_probe() was skipped for TFABOOT and SPL_BUILD. The idea
of skipping probe() is that we can't access BSEC from the normal
world. This is true with TFABOOT. However, in SPL, we are in the
secure world, so skipping probe is incorrect. In fact, SPL is not
even built when TFABOOT is selected.

Thus, only skip probe with TFABOOT, but not SPL_BUILD.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 arch/arm/mach-stm32mp/bsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index fe39bd80cf..a02d19c1b9 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -506,7 +506,7 @@ static int stm32mp_bsec_probe(struct udevice *dev)
 	 * only executed in U-Boot proper when TF-A is not used
 	 */
 
-	if (!IS_ENABLED(CONFIG_TFABOOT) && !IS_ENABLED(CONFIG_SPL_BUILD)) {
+	if (!IS_ENABLED(CONFIG_TFABOOT)) {
 		plat = dev_get_plat(dev);
 
 		for (otp = 57; otp <= BSEC_OTP_MAX_VALUE; otp++)
-- 
2.31.1



More information about the U-Boot mailing list