summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/prom.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-06-08 07:48:09 -0600
committerGrant Likely <grant.likely@secretlab.ca>2010-07-05 16:14:26 -0600
commit1f5bef30cf6c66f097ea5dfc580a41924df888d1 (patch)
tree345d9db4b6b20de814599cb7129005abd945ceea /arch/microblaze/include/asm/prom.h
parent6b884a8d50a6eea2fb3dad7befe748f67193073b (diff)
downloadlinux-1f5bef30cf6c66f097ea5dfc580a41924df888d1.tar.bz2
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/asm/prom.h')
-rw-r--r--arch/microblaze/include/asm/prom.h17
1 files changed, 9 insertions, 8 deletions
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,
extern const u32 *of_get_pci_address(struct device_node *dev, int bar_no,
u64 *size, unsigned int *flags);
-/* Get an address as a resource. Note that if your address is
- * a PIO address, the conversion will fail if the physical address
- * can't be internally converted to an IO token with
- * pci_address_to_pio(), that is because it's either called to early
- * or it can't be matched to any host bridge IO space
- */
-extern int of_address_to_resource(struct device_node *dev, int index,
- struct resource *r);
extern int of_pci_address_to_resource(struct device_node *dev, int bar,
struct resource *r);
+#ifdef CONFIG_PCI
+extern unsigned long pci_address_to_pio(phys_addr_t address);
+#else
+static inline unsigned long pci_address_to_pio(phys_addr_t address)
+{
+ return (unsigned long)-1;
+}
+#endif /* CONFIG_PCI */
+
/* Parse the ibm,dma-window property of an OF node into the busno, phys and
* size parameters.
*/