Lines Matching +full:secure +full:- +full:reg +full:- +full:access
1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/nvmem-provider.h>
13 * struct sec_qfprom - structure holding secure qfprom attributes
15 * @base: starting physical address for secure qfprom corrected address space.
23 static int sec_qfprom_reg_read(void *context, unsigned int reg, void *_val, size_t bytes) in sec_qfprom_reg_read() argument
31 for (i = 0; i < bytes; i++, reg++) { in sec_qfprom_reg_read()
32 if (i == 0 || reg % 4 == 0) { in sec_qfprom_reg_read()
33 if (qcom_scm_io_readl(priv->base + (reg & ~3), &read_val)) { in sec_qfprom_reg_read()
34 dev_err(priv->dev, "Couldn't access fuse register\n"); in sec_qfprom_reg_read()
35 return -EINVAL; in sec_qfprom_reg_read()
40 val[i] = tmp[reg & 3]; in sec_qfprom_reg_read()
49 .name = "sec-qfprom", in sec_qfprom_probe()
56 struct device *dev = &pdev->dev; in sec_qfprom_probe()
63 return -ENOMEM; in sec_qfprom_probe()
67 return -EINVAL; in sec_qfprom_probe()
69 priv->base = res->start; in sec_qfprom_probe()
75 priv->dev = dev; in sec_qfprom_probe()
83 { .compatible = "qcom,sec-qfprom" },
96 MODULE_DESCRIPTION("Qualcomm Secure QFPROM driver");