Lines Matching +full:imx +full:- +full:scu
1 // SPDX-License-Identifier: GPL-2.0+
10 #include <linux/arm-smccc.h>
11 #include <linux/firmware/imx/sci.h>
13 #include <linux/nvmem-provider.h>
78 const struct ocotp_devtype_data *data = priv->data; in in_hole()
81 for (i = 0; i < data->num_region; i++) { in in_hole()
82 if (data->region[i].flag & HOLE_REGION) { in in_hole()
83 if ((index >= data->region[i].start) && in in_hole()
84 (index <= data->region[i].end)) in in_hole()
95 const struct ocotp_devtype_data *data = priv->data; in in_ecc()
98 for (i = 0; i < data->num_region; i++) { in in_ecc()
99 if (data->region[i].flag & ECC_REGION) { in in_ecc()
100 if ((index >= data->region[i].start) && in in_ecc()
101 (index <= data->region[i].end)) in in_ecc()
116 hdr->ver = IMX_SC_RPC_VERSION; in imx_sc_misc_otp_fuse_read()
117 hdr->svc = IMX_SC_RPC_SVC_MISC; in imx_sc_misc_otp_fuse_read()
118 hdr->func = IMX_SC_MISC_FUNC_OTP_FUSE_READ; in imx_sc_misc_otp_fuse_read()
119 hdr->size = 2; in imx_sc_misc_otp_fuse_read()
145 if (count > (priv->data->nregs - index)) in imx_scu_ocotp_read()
146 count = priv->data->nregs - index; in imx_scu_ocotp_read()
150 return -ENOMEM; in imx_scu_ocotp_read()
162 ret = imx_sc_misc_otp_fuse_read(priv->nvmem_ipc, i, buf); in imx_scu_ocotp_read()
192 return -EINVAL; in imx_scu_ocotp_write()
197 return -EINVAL; in imx_scu_ocotp_write()
202 ret = imx_sc_misc_otp_fuse_read(priv->nvmem_ipc, index, &tmp); in imx_scu_ocotp_write()
208 return -EIO; in imx_scu_ocotp_write()
222 .name = "imx-scu-ocotp",
233 { .compatible = "fsl,imx8qxp-scu-ocotp", (void *)&imx8qxp_data },
234 { .compatible = "fsl,imx8qm-scu-ocotp", (void *)&imx8qm_data },
241 struct device *dev = &pdev->dev; in imx_scu_ocotp_probe()
248 return -ENOMEM; in imx_scu_ocotp_probe()
250 ret = imx_scu_get_handle(&priv->nvmem_ipc); in imx_scu_ocotp_probe()
254 priv->data = of_device_get_match_data(dev); in imx_scu_ocotp_probe()
255 priv->dev = dev; in imx_scu_ocotp_probe()
256 imx_scu_ocotp_nvmem_config.size = 4 * priv->data->nregs; in imx_scu_ocotp_probe()
274 MODULE_DESCRIPTION("i.MX8 SCU OCOTP fuse box driver");