aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/include/asm/prom.h8
-rw-r--r--include/linux/of_address.h30
2 files changed, 17 insertions, 21 deletions
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 60c8d7bd4058..11ebd659e7b6 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -59,13 +59,5 @@ extern char *of_console_options;
59extern void irq_trans_init(struct device_node *dp); 59extern void irq_trans_init(struct device_node *dp);
60extern char *build_path_component(struct device_node *dp); 60extern char *build_path_component(struct device_node *dp);
61 61
62/* SPARC has local implementations */
63extern int of_address_to_resource(struct device_node *dev, int index,
64 struct resource *r);
65#define of_address_to_resource of_address_to_resource
66
67void __iomem *of_iomap(struct device_node *node, int index);
68#define of_iomap of_iomap
69
70#endif /* __KERNEL__ */ 62#endif /* __KERNEL__ */
71#endif /* _SPARC_PROM_H */ 63#endif /* _SPARC_PROM_H */
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index f6fc6899ceae..e8a179773a1a 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -60,13 +60,6 @@ extern struct of_pci_range *of_pci_range_parser_one(
60 struct of_pci_range_parser *parser, 60 struct of_pci_range_parser *parser,
61 struct of_pci_range *range); 61 struct of_pci_range *range);
62#else /* CONFIG_OF_ADDRESS */ 62#else /* CONFIG_OF_ADDRESS */
63#ifndef of_address_to_resource
64static inline int of_address_to_resource(struct device_node *dev, int index,
65 struct resource *r)
66{
67 return -EINVAL;
68}
69#endif
70static inline struct device_node *of_find_matching_node_by_address( 63static inline struct device_node *of_find_matching_node_by_address(
71 struct device_node *from, 64 struct device_node *from,
72 const struct of_device_id *matches, 65 const struct of_device_id *matches,
@@ -74,12 +67,7 @@ static inline struct device_node *of_find_matching_node_by_address(
74{ 67{
75 return NULL; 68 return NULL;
76} 69}
77#ifndef of_iomap 70
78static inline void __iomem *of_iomap(struct device_node *device, int index)
79{
80 return NULL;
81}
82#endif
83static inline const __be32 *of_get_address(struct device_node *dev, int index, 71static inline const __be32 *of_get_address(struct device_node *dev, int index,
84 u64 *size, unsigned int *flags) 72 u64 *size, unsigned int *flags)
85{ 73{
@@ -100,6 +88,22 @@ static inline struct of_pci_range *of_pci_range_parser_one(
100} 88}
101#endif /* CONFIG_OF_ADDRESS */ 89#endif /* CONFIG_OF_ADDRESS */
102 90
91#ifdef CONFIG_OF
92extern int of_address_to_resource(struct device_node *dev, int index,
93 struct resource *r);
94void __iomem *of_iomap(struct device_node *node, int index);
95#else
96static inline int of_address_to_resource(struct device_node *dev, int index,
97 struct resource *r)
98{
99 return -EINVAL;
100}
101
102static inline void __iomem *of_iomap(struct device_node *device, int index)
103{
104 return NULL;
105}
106#endif
103 107
104#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI) 108#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_PCI)
105extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, 109extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no,