diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-09-07 15:07:11 -0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-09 21:04:06 -0400 |
commit | 25ff79443cbfa924b8df1d4a8a0fbff83816938a (patch) | |
tree | e7a9ac5cb39449b55d132c0838f7d866bc7d703c /drivers/of/address.c | |
parent | ba904f0649357a3cbd67e752d30898c42b1fc91a (diff) |
of: implement pci_address_to_pio as weak function
Implement pci_address_to_pio as weak function to remove the dependency on
asm/prom.h. This is in preparation to make prom.h optional.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'drivers/of/address.c')
-rw-r--r-- | drivers/of/address.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index b55c21890760..556a7fb6ead3 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -626,6 +626,14 @@ const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, | |||
626 | } | 626 | } |
627 | EXPORT_SYMBOL(of_get_address); | 627 | EXPORT_SYMBOL(of_get_address); |
628 | 628 | ||
629 | unsigned long __weak pci_address_to_pio(phys_addr_t address) | ||
630 | { | ||
631 | if (address > IO_SPACE_LIMIT) | ||
632 | return (unsigned long)-1; | ||
633 | |||
634 | return (unsigned long) address; | ||
635 | } | ||
636 | |||
629 | static int __of_address_to_resource(struct device_node *dev, | 637 | static int __of_address_to_resource(struct device_node *dev, |
630 | const __be32 *addrp, u64 size, unsigned int flags, | 638 | const __be32 *addrp, u64 size, unsigned int flags, |
631 | const char *name, struct resource *r) | 639 | const char *name, struct resource *r) |