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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -33,6 +33,9 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); · 32 unmodified lines | |||
| 33 | 33 | ||
| 34 | int of_reserved_mem_device_init_by_idx(struct device *dev, | 34 | int of_reserved_mem_device_init_by_idx(struct device *dev, |
| 35 | struct device_node *np, int idx); | 35 | 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); | ||
| 36 | void of_reserved_mem_device_release(struct device *dev); | 39 | void of_reserved_mem_device_release(struct device *dev); |
| 37 | 40 | ||
| 38 | void fdt_init_reserved_mem(void); | 41 | 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 | |||
| 45 | { | 48 | { |
| 46 | return -ENOSYS; | 49 | return -ENOSYS; |
| 47 | } | 50 | } |
| 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 | |||
| 48 | static inline void of_reserved_mem_device_release(struct device *pdev) { } | 59 | static inline void of_reserved_mem_device_release(struct device *pdev) { } |
| 49 | 60 | ||
| 50 | static inline void fdt_init_reserved_mem(void) { } | 61 | static inline void fdt_init_reserved_mem(void) { } |