diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:09 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:26 -0400 |
commit | 1f5bef30cf6c66f097ea5dfc580a41924df888d1 (patch) | |
tree | 345d9db4b6b20de814599cb7129005abd945ceea /arch/microblaze/include | |
parent | 6b884a8d50a6eea2fb3dad7befe748f67193073b (diff) |
of/address: merge of_address_to_resource()
Merge common code between PowerPC and Microblaze. This patch also
moves the prototype of pci_address_to_pio() out of pci-bridge.h and
into prom.h because the only user of pci_address_to_pio() is
of_address_to_resource().
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Michal Simek <monstr@monstr.eu>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/pci-bridge.h | 5 | ||||
-rw-r--r-- | arch/microblaze/include/asm/prom.h | 17 |
2 files changed, 9 insertions, 13 deletions
diff --git a/arch/microblaze/include/asm/pci-bridge.h b/arch/microblaze/include/asm/pci-bridge.h index 0c77cda9f5d8..0c68764ab547 100644 --- a/arch/microblaze/include/asm/pci-bridge.h +++ b/arch/microblaze/include/asm/pci-bridge.h | |||
@@ -172,13 +172,8 @@ static inline int pci_has_flag(int flag) | |||
172 | 172 | ||
173 | extern struct list_head hose_list; | 173 | extern struct list_head hose_list; |
174 | 174 | ||
175 | extern unsigned long pci_address_to_pio(phys_addr_t address); | ||
176 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | 175 | extern int pcibios_vaddr_is_ioport(void __iomem *address); |
177 | #else | 176 | #else |
178 | static inline unsigned long pci_address_to_pio(phys_addr_t address) | ||
179 | { | ||
180 | return (unsigned long)-1; | ||
181 | } | ||
182 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) | 177 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) |
183 | { | 178 | { |
184 | return 0; | 179 | return 0; |
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index 6411c3b3a80f..4e94c0706c50 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h | |||
@@ -65,17 +65,18 @@ extern const u32 *of_get_address(struct device_node *dev, int index, | |||
65 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, | 65 | extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no, |
66 | u64 *size, unsigned int *flags); | 66 | u64 *size, unsigned int *flags); |
67 | 67 | ||
68 | /* Get an address as a resource. Note that if your address is | ||
69 | * a PIO address, the conversion will fail if the physical address | ||
70 | * can't be internally converted to an IO token with | ||
71 | * pci_address_to_pio(), that is because it's either called to early | ||
72 | * or it can't be matched to any host bridge IO space | ||
73 | */ | ||
74 | extern int of_address_to_resource(struct device_node *dev, int index, | ||
75 | struct resource *r); | ||
76 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 68 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
77 | struct resource *r); | 69 | struct resource *r); |
78 | 70 | ||
71 | #ifdef CONFIG_PCI | ||
72 | extern unsigned long pci_address_to_pio(phys_addr_t address); | ||
73 | #else | ||
74 | static inline unsigned long pci_address_to_pio(phys_addr_t address) | ||
75 | { | ||
76 | return (unsigned long)-1; | ||
77 | } | ||
78 | #endif /* CONFIG_PCI */ | ||
79 | |||
79 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and | 80 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and |
80 | * size parameters. | 81 | * size parameters. |
81 | */ | 82 | */ |