Lines Matching +full:revision +full:- +full:id

1 // SPDX-License-Identifier: GPL-2.0
6 #include <dt-bindings/firmware/imx/rsrc.h>
23 u32 id; member
40 hdr->ver = IMX_SC_RPC_VERSION; in imx_scu_soc_uid()
41 hdr->svc = IMX_SC_RPC_SVC_MISC; in imx_scu_soc_uid()
42 hdr->func = IMX_SC_MISC_FUNC_UNIQUE_ID; in imx_scu_soc_uid()
43 hdr->size = 1; in imx_scu_soc_uid()
64 hdr->ver = IMX_SC_RPC_VERSION; in imx_scu_soc_id()
65 hdr->svc = IMX_SC_RPC_SVC_MISC; in imx_scu_soc_id()
66 hdr->func = IMX_SC_MISC_FUNC_GET_CONTROL; in imx_scu_soc_id()
67 hdr->size = 3; in imx_scu_soc_id()
78 return msg.data.resp.id; in imx_scu_soc_id()
81 static const char *imx_scu_soc_name(u32 id) in imx_scu_soc_name() argument
83 switch (id) { in imx_scu_soc_name()
101 int id, ret; in imx_scu_soc_init() local
112 return -ENOMEM; in imx_scu_soc_init()
114 soc_dev_attr->family = "Freescale i.MX"; in imx_scu_soc_init()
118 &soc_dev_attr->machine); in imx_scu_soc_init()
122 id = imx_scu_soc_id(); in imx_scu_soc_init()
123 if (id < 0) in imx_scu_soc_init()
124 return -EINVAL; in imx_scu_soc_init()
128 return -EINVAL; in imx_scu_soc_init()
131 val = id & 0x1f; in imx_scu_soc_init()
132 soc_dev_attr->soc_id = imx_scu_soc_name(val); in imx_scu_soc_init()
134 /* format revision value passed from SCU firmware */ in imx_scu_soc_init()
135 val = (id >> 5) & 0xf; in imx_scu_soc_init()
137 soc_dev_attr->revision = devm_kasprintf(dev, GFP_KERNEL, "%d.%d", in imx_scu_soc_init()
139 if (!soc_dev_attr->revision) in imx_scu_soc_init()
140 return -ENOMEM; in imx_scu_soc_init()
142 soc_dev_attr->serial_number = devm_kasprintf(dev, GFP_KERNEL, in imx_scu_soc_init()
144 if (!soc_dev_attr->serial_number) in imx_scu_soc_init()
145 return -ENOMEM; in imx_scu_soc_init()