aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_reserved_mem.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2020-04-03 19:44:52 +0200
committerThierry Reding <treding@nvidia.com>2020-04-30 12:38:01 +0200
commit0da0e31600e8a42c6f1dfaa7a06211c8bb243ea7 (patch)
tree5b684291ddb8e32b55c0b358ab9c03b0f7381c95 /include/linux/of_reserved_mem.h
parentLinux 5.7-rc1 (diff)
downloadlinux-dev-0da0e31600e8a42c6f1dfaa7a06211c8bb243ea7.tar.xz
linux-dev-0da0e31600e8a42c6f1dfaa7a06211c8bb243ea7.zip
of: reserved-memory: Support lookup of regions by name
Add support for looking up memory regions by name. This looks up the given name in the newly introduced memory-region-names property and returns the memory region at the corresponding index in the memory- region(s) property. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/linux/of_reserved_mem.h')
-rw-r--r--include/linux/of_reserved_mem.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
index 60f541912ccf..a1b427ac291b 100644
--- a/include/linux/of_reserved_mem.h
+++ b/include/linux/of_reserved_mem.h
@@ -33,6 +33,9 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem);
int of_reserved_mem_device_init_by_idx(struct device *dev,
struct device_node *np, int idx);
+int of_reserved_mem_device_init_by_name(struct device *dev,
+ struct device_node *np,
+ const char *name);
void of_reserved_mem_device_release(struct device *dev);
void fdt_init_reserved_mem(void);
@@ -45,6 +48,14 @@ static inline int of_reserved_mem_device_init_by_idx(struct device *dev,
{
return -ENOSYS;
}
+
+static inline int of_reserved_mem_device_init_by_name(struct device *dev,
+ struct device_node *np,
+ const char *name)
+{
+ return -ENOSYS;
+}
+
static inline void of_reserved_mem_device_release(struct device *pdev) { }
static inline void fdt_init_reserved_mem(void) { }