Lines Matching +full:efuse +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Amlogic Meson GX eFuse Driver
11 #include <linux/nvmem-provider.h>
36 { .compatible = "amlogic,meson-gxbb-efuse", },
43 struct device *dev = &pdev->dev; in meson_efuse_probe()
49 unsigned int size; in meson_efuse_probe() local
52 sm_np = of_parse_phandle(pdev->dev.of_node, "secure-monitor", 0); in meson_efuse_probe()
54 dev_err(&pdev->dev, "no secure-monitor node\n"); in meson_efuse_probe()
55 return -ENODEV; in meson_efuse_probe()
61 return -EPROBE_DEFER; in meson_efuse_probe()
66 if (ret != -EPROBE_DEFER) in meson_efuse_probe()
67 dev_err(dev, "failed to get efuse gate"); in meson_efuse_probe()
85 if (meson_sm_call(fw, SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) { in meson_efuse_probe()
87 return -EINVAL; in meson_efuse_probe()
92 return -ENOMEM; in meson_efuse_probe()
94 econfig->dev = dev; in meson_efuse_probe()
95 econfig->name = dev_name(dev); in meson_efuse_probe()
96 econfig->stride = 1; in meson_efuse_probe()
97 econfig->word_size = 1; in meson_efuse_probe()
98 econfig->reg_read = meson_efuse_read; in meson_efuse_probe()
99 econfig->reg_write = meson_efuse_write; in meson_efuse_probe()
100 econfig->size = size; in meson_efuse_probe()
101 econfig->priv = fw; in meson_efuse_probe()
103 nvmem = devm_nvmem_register(&pdev->dev, econfig); in meson_efuse_probe()
111 .name = "meson-efuse",