of/address: Introduce of_dma_get_max_cpu_address()
Introduce of_dma_get_max_cpu_address(), which provides the highest CPU physical address addressable by all DMA masters in the system. It's specially useful for setting memory zones sizes at early boot time. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201119175400.9995-4-nsaenzjulienne@suse.de Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
9804f8c69b
commit
964db79d6c
2 changed files with 49 additions and 0 deletions
|
|
@ -558,6 +558,8 @@ int of_map_id(struct device_node *np, u32 id,
|
|||
const char *map_name, const char *map_mask_name,
|
||||
struct device_node **target, u32 *id_out);
|
||||
|
||||
phys_addr_t of_dma_get_max_cpu_address(struct device_node *np);
|
||||
|
||||
#else /* CONFIG_OF */
|
||||
|
||||
static inline void of_core_init(void)
|
||||
|
|
@ -995,6 +997,11 @@ static inline int of_map_id(struct device_node *np, u32 id,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
|
||||
{
|
||||
return PHYS_ADDR_MAX;
|
||||
}
|
||||
|
||||
#define of_match_ptr(_ptr) NULL
|
||||
#define of_match_node(_matches, _node) NULL
|
||||
#endif /* CONFIG_OF */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue