Lines Matching +full:nvmem +full:- +full:rmem
1 // SPDX-License-Identifier: GPL-2.0+
8 #include <linux/nvmem-provider.h>
12 struct rmem { struct
14 struct nvmem_device *nvmem; member
23 struct rmem *priv = context; in rmem_read() argument
24 size_t available = priv->mem->size; in rmem_read()
32 * uses-cases for this driver, the performance hit isn't a concern. in rmem_read()
33 * Nor is likely to be, given the nature of the subsystem. Most nvmem in rmem_read()
39 addr = memremap(priv->mem->base, available, MEMREMAP_WB); in rmem_read()
41 dev_err(priv->dev, "Failed to remap memory region\n"); in rmem_read()
42 return -ENOMEM; in rmem_read()
55 struct device *dev = &pdev->dev; in rmem_probe()
57 struct rmem *priv; in rmem_probe()
61 return -ENOMEM; in rmem_probe()
62 priv->dev = dev; in rmem_probe()
64 mem = of_reserved_mem_lookup(dev->of_node); in rmem_probe()
67 return -EINVAL; in rmem_probe()
69 priv->mem = mem; in rmem_probe()
73 config.name = "rmem"; in rmem_probe()
74 config.size = mem->size; in rmem_probe()
81 { .compatible = "nvmem-rmem", },
89 .name = "rmem",
96 MODULE_DESCRIPTION("Reserved Memory Based nvmem Driver");