History

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.

Thierry Reding committed 6 years ago

Commit 0da0e311 parent 8f3d9f32 files · +30 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/of_reserved_mem.h+11−0
@@ -33,6 +33,9 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); · 32 unmodified lines
3333
3434 int of_reserved_mem_device_init_by_idx(struct device *dev,
3535 struct device_node *np, int idx);
36+int of_reserved_mem_device_init_by_name(struct device *dev,
37+ struct device_node *np,
38+ const char *name);
3639 void of_reserved_mem_device_release(struct device *dev);
3740
3841 void fdt_init_reserved_mem(void);
@@ -45,6 +48,14 @@ static inline int of_reserved_mem_device_init_by_idx(struct device *dev, · 6 unmodified lines
4548 {
4649 return -ENOSYS;
4750 }
51+
52+static inline int of_reserved_mem_device_init_by_name(struct device *dev,
53+ struct device_node *np,
54+ const char *name)
55+{
56+ return -ENOSYS;
57+}
58+
4859 static inline void of_reserved_mem_device_release(struct device *pdev) { }
4960
5061 static inline void fdt_init_reserved_mem(void) { }