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>
42 { .compatible = "amlogic,meson-gxbb-efuse", },
49 struct device *dev = &pdev->dev; in meson_efuse_probe()
54 unsigned int size; in meson_efuse_probe() local
56 of_parse_phandle(pdev->dev.of_node, "secure-monitor", 0); in meson_efuse_probe()
59 dev_err(&pdev->dev, "no secure-monitor node\n"); in meson_efuse_probe()
60 return -ENODEV; in meson_efuse_probe()
65 return -EPROBE_DEFER; in meson_efuse_probe()
69 return dev_err_probe(dev, PTR_ERR(clk), "failed to get efuse gate"); in meson_efuse_probe()
71 if (meson_sm_call(fw, SM_EFUSE_USER_MAX, &size, 0, 0, 0, 0, 0) < 0) { in meson_efuse_probe()
73 return -EINVAL; in meson_efuse_probe()
78 return -ENOMEM; in meson_efuse_probe()
80 econfig->dev = dev; in meson_efuse_probe()
81 econfig->name = dev_name(dev); in meson_efuse_probe()
82 econfig->add_legacy_fixed_of_cells = true; in meson_efuse_probe()
83 econfig->stride = 1; in meson_efuse_probe()
84 econfig->word_size = 1; in meson_efuse_probe()
85 econfig->reg_read = meson_efuse_read; in meson_efuse_probe()
86 econfig->reg_write = meson_efuse_write; in meson_efuse_probe()
87 econfig->size = size; in meson_efuse_probe()
88 econfig->priv = fw; in meson_efuse_probe()
90 nvmem = devm_nvmem_register(&pdev->dev, econfig); in meson_efuse_probe()
98 .name = "meson-efuse",