mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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>
This commit is contained in:
@@ -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) { }
|
||||
|
||||
Reference in New Issue
Block a user