MLK-23403-1 Fix fail cat /sys/devices/soc0/soc_uid
SCU IMX_SC_MISC_FUNC_UNIQUE_ID don't return value by scu return value from SCU is undefined. Signed-off-by: Frank Li <Frank.Li@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
862ea84e94
commit
1d6395a58c
|
@ -41,18 +41,15 @@ static ssize_t soc_uid_show(struct device *dev,
|
|||
struct imx_sc_msg_misc_get_soc_uid msg;
|
||||
struct imx_sc_rpc_msg *hdr = &msg.hdr;
|
||||
u64 soc_uid;
|
||||
int ret;
|
||||
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
|
||||
hdr->ver = IMX_SC_RPC_VERSION;
|
||||
hdr->svc = IMX_SC_RPC_SVC_MISC;
|
||||
hdr->func = IMX_SC_MISC_FUNC_UNIQUE_ID;
|
||||
hdr->size = 1;
|
||||
|
||||
ret = imx_scu_call_rpc(soc_ipc_handle, &msg, true);
|
||||
if (ret) {
|
||||
pr_err("%s: get soc uid failed, ret %d\n", __func__, ret);
|
||||
return ret;
|
||||
}
|
||||
imx_scu_call_rpc(soc_ipc_handle, &msg, true);
|
||||
|
||||
soc_uid = msg.uid_high;
|
||||
soc_uid <<= 32;
|
||||
|
|
Loading…
Reference in New Issue