Skip to contentSkip to conversation

soc: imx: imx93_lpm: return -EPROBE_DEFER when SE firmware

PATCH Superseded Bratiranjan Acharya 2 participants 2 messages Aug 24 – Sep 2 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: imx: imx93_lpm: return -EPROBE_DEFER when SE firmware

imx_get_se_data_info() returns NULL during early boot because the EdgeLock Enclave firmware takes ~900ms to register its services. Returning -ENODEV here permanently drops the driver with no retry, leaving DDR DVFS and lpm-cooling non-functional.

Return -EPROBE_DEFER so the driver retries once SE firmware is up.

Tested on i.MX93: probe defers once, succeeds on retry, lpm-cooling and DDR frequency scaling both operational.

Fixes 711990e353bb ("LF-13910: soc: imx93: lpm changes to update exported apis")
---
 drivers/soc/imx/imx93_lpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/imx/imx93_lpm.c +1 -1
index bfa52ff8f..26d72e3e2 100644
@@ -621,7 +621,7 @@ static int imx93_lpm_probe(struct platform_device *pdev)
 	se_data = imx_get_se_data_info(SOC_ID_OF_IMX93, 0);
 	if (!se_data) {
 		dev_err(&pdev->dev, "get se-fw2 failed\n");
-		return -ENODEV;
+		return -EPROBE_DEFER;
 	}
 
 	/*
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines

Subject: [PATCH] soc: imx: imx93_lpm: return -EPROBE_DEFER when SE firmware

Oh. This is for nxp release tree.

Quoted 6 lines

imx_get_se_data_info() returns NULL during early boot because the EdgeLock Enclave firmware takes ~900ms to register its services. Returning -ENODEV here permanently drops the driver with no retry, leaving DDR DVFS and lpm-cooling non-functional.

Quoted 8 lines

Return -EPROBE_DEFER so the driver retries once SE firmware is up.

Tested on i.MX93: probe defers once, succeeds on retry, lpm-cooling and DDR frequency scaling both operational.

Fixes 711990e353bb ("LF-13910: soc: imx93: lpm changes to update

exported apis")

Looks good to me.

Quoted 18 lines
---
 drivers/soc/imx/imx93_lpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/soc/imx/imx93_lpm.c index bfa52ff8f..26d72e3e2 100644

drivers/soc/imx/imx93_lpm.c +1 -1
@@ -621,7 +621,7 @@ static int imx93_lpm_probe(struct
 platform_device *pdev)
        se_data = imx_get_se_data_info(SOC_ID_OF_IMX93, 0);
        if (!se_data) {
                dev_err(&pdev->dev, "get se-fw2 failed\n");
-               return -ENODEV;
+               return -EPROBE_DEFER;
        }
 
        /*
Quoted 2 lines

--
2.34.1

NXP Confidential