3 #include <linux/ioport.h>
6 extern u64
of_translate_address(struct device_node
*np
, const __be32
*addr
);
7 extern int of_address_to_resource(struct device_node
*dev
, int index
,
9 extern void __iomem
*of_iomap(struct device_node
*device
, int index
);
11 /* Extract an address from a device, returns the region size and
12 * the address space flags too. The PCI version uses a BAR number
13 * instead of an absolute index
15 extern const u32
*of_get_address(struct device_node
*dev
, int index
,
16 u64
*size
, unsigned int *flags
);
18 #ifndef pci_address_to_pio
19 static inline unsigned long pci_address_to_pio(phys_addr_t addr
) { return -1; }
20 #define pci_address_to_pio pci_address_to_pio
24 extern const __be32
*of_get_pci_address(struct device_node
*dev
, int bar_no
,
25 u64
*size
, unsigned int *flags
);
26 extern int of_pci_address_to_resource(struct device_node
*dev
, int bar
,
28 #else /* CONFIG_PCI */
29 static inline int of_pci_address_to_resource(struct device_node
*dev
, int bar
,
35 static inline const __be32
*of_get_pci_address(struct device_node
*dev
,
36 int bar_no
, u64
*size
, unsigned int *flags
)
40 #endif /* CONFIG_PCI */
43 #endif /* __OF_ADDRESS_H */