mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 06:41:39 +00:00
iommu/of: make of_pci_map_rid() available for other devices too
iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. 'of_pci_map_rid' is renamed here to 'of_map_rid' and there is no functional change done in the API. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
c9d8d661ec
commit
2a6db719c9
6 changed files with 117 additions and 117 deletions
|
@ -550,6 +550,10 @@ bool of_console_check(struct device_node *dn, char *name, int index);
|
|||
|
||||
extern int of_cpu_node_to_id(struct device_node *np);
|
||||
|
||||
int of_map_rid(struct device_node *np, u32 rid,
|
||||
const char *map_name, const char *map_mask_name,
|
||||
struct device_node **target, u32 *id_out);
|
||||
|
||||
#else /* CONFIG_OF */
|
||||
|
||||
static inline void of_core_init(void)
|
||||
|
@ -952,6 +956,13 @@ static inline int of_cpu_node_to_id(struct device_node *np)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int of_map_rid(struct device_node *np, u32 rid,
|
||||
const char *map_name, const char *map_mask_name,
|
||||
struct device_node **target, u32 *id_out)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#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