From: Juha Siltanen <[email protected]>

kaddr1 is NULL in case of SVC_STATUS_NO_SUPPORT and res->a0 cannot
be accessed.

Signed-off-by: Juha Siltanen <[email protected]>
[SMC calls feature was supported in u-boot-socfpga since v2023.10,
this will fix boot hang issue if u-boot version is older than 2023.10]
Signed-off-by: Liwei Song <[email protected]>
---
 drivers/firmware/stratix10-rsu.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c
index a6d6a5076b45..524a1204e701 100644
--- a/drivers/firmware/stratix10-rsu.c
+++ b/drivers/firmware/stratix10-rsu.c
@@ -316,8 +316,12 @@ static void rsu_get_device_info_callback(struct 
stratix10_svc_client *client,
                        FIELD_GET(RSU_ERASE_SIZE_MASK, res->a4);
 
        } else {
-               dev_err(client->dev, "COMMAND_RSU_GET_DEVICE_INFO returned 
0x%lX\n",
-                       res->a0);
+               if (data->status == BIT(SVC_STATUS_NO_SUPPORT))
+                       dev_warn(client->dev, "Secure FW doesn't support get 
device info\n");
+               else
+                       dev_err(client->dev, "COMMAND_RSU_GET_DEVICE_INFO 
returned 0x%lX\n",
+                               res->a0);
+
                priv->device_info[0].size = INVALID_DEVICE_INFO;
                priv->device_info[1].size = INVALID_DEVICE_INFO;
                priv->device_info[2].size = INVALID_DEVICE_INFO;
-- 
2.40.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14676): 
https://lists.yoctoproject.org/g/linux-yocto/message/14676
Mute This Topic: https://lists.yoctoproject.org/mt/110158811/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to