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
33 33
34int of_reserved_mem_device_init_by_idx(struct device *dev,34int of_reserved_mem_device_init_by_idx(struct device *dev,
35 struct device_node *np, int idx);35 struct device_node *np, int idx);
36int of_reserved_mem_device_init_by_name(struct device *dev,
37 struct device_node *np,
38 const char *name);
36void of_reserved_mem_device_release(struct device *dev);39void of_reserved_mem_device_release(struct device *dev);
37 40
38void fdt_init_reserved_mem(void);41void 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
45{48{
46 return -ENOSYS;49 return -ENOSYS;
47}50}
51
52static 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
48static inline void of_reserved_mem_device_release(struct device *pdev) { }59static inline void of_reserved_mem_device_release(struct device *pdev) { }
49 60
50static inline void fdt_init_reserved_mem(void) { }61static inline void fdt_init_reserved_mem(void) { }