diff options
author | Nipun Gupta <nipun.gupta@nxp.com> | 2018-09-10 09:49:16 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-09-25 03:47:52 -0400 |
commit | 2a6db719c92dbfe43c9eea7e4358ea2e51b5004e (patch) | |
tree | 4c685a9457b305ca4ce8f620e85c0a34de97ca0c /include/linux/of.h | |
parent | c9d8d661ece808f987e606d73d57e3bd6849ac6a (diff) |
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>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 99b0ebf49632..bf577ca3c8e7 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -550,6 +550,10 @@ bool of_console_check(struct device_node *dn, char *name, int index); | |||
550 | 550 | ||
551 | extern int of_cpu_node_to_id(struct device_node *np); | 551 | extern int of_cpu_node_to_id(struct device_node *np); |
552 | 552 | ||
553 | int of_map_rid(struct device_node *np, u32 rid, | ||
554 | const char *map_name, const char *map_mask_name, | ||
555 | struct device_node **target, u32 *id_out); | ||
556 | |||
553 | #else /* CONFIG_OF */ | 557 | #else /* CONFIG_OF */ |
554 | 558 | ||
555 | static inline void of_core_init(void) | 559 | static inline void of_core_init(void) |
@@ -952,6 +956,13 @@ static inline int of_cpu_node_to_id(struct device_node *np) | |||
952 | return -ENODEV; | 956 | return -ENODEV; |
953 | } | 957 | } |
954 | 958 | ||
959 | static inline int of_map_rid(struct device_node *np, u32 rid, | ||
960 | const char *map_name, const char *map_mask_name, | ||
961 | struct device_node **target, u32 *id_out) | ||
962 | { | ||
963 | return -EINVAL; | ||
964 | } | ||
965 | |||
955 | #define of_match_ptr(_ptr) NULL | 966 | #define of_match_ptr(_ptr) NULL |
956 | #define of_match_node(_matches, _node) NULL | 967 | #define of_match_node(_matches, _node) NULL |
957 | #endif /* CONFIG_OF */ | 968 | #endif /* CONFIG_OF */ |