forked from Minki/linux
[PATCH] powerpc: fix for "Update OF address parsers"
This allows iSeries to build again. It just moves pci_address_to_pio outside the #ifdef CONFIG_PPC_MULTIPLATFORM. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
e07102db63
commit
d4e4b3520c
|
@ -1181,20 +1181,6 @@ void phbs_remap_io(void)
|
||||||
remap_bus_range(hose->bus);
|
remap_bus_range(hose->bus);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int pci_address_to_pio(phys_addr_t address)
|
|
||||||
{
|
|
||||||
struct pci_controller *hose, *tmp;
|
|
||||||
|
|
||||||
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
|
|
||||||
if (address >= hose->io_base_phys &&
|
|
||||||
address < (hose->io_base_phys + hose->pci_io_size))
|
|
||||||
return (unsigned int)hose->io_base_virt +
|
|
||||||
(address - hose->io_base_phys);
|
|
||||||
}
|
|
||||||
return (unsigned int)-1;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(pci_address_to_pio);
|
|
||||||
|
|
||||||
static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
|
static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
struct pci_controller *hose = pci_bus_to_host(dev->bus);
|
struct pci_controller *hose = pci_bus_to_host(dev->bus);
|
||||||
|
@ -1337,6 +1323,20 @@ struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
|
||||||
|
|
||||||
#endif /* CONFIG_PPC_MULTIPLATFORM */
|
#endif /* CONFIG_PPC_MULTIPLATFORM */
|
||||||
|
|
||||||
|
unsigned int pci_address_to_pio(phys_addr_t address)
|
||||||
|
{
|
||||||
|
struct pci_controller *hose, *tmp;
|
||||||
|
|
||||||
|
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
|
||||||
|
if (address >= hose->io_base_phys &&
|
||||||
|
address < (hose->io_base_phys + hose->pci_io_size))
|
||||||
|
return (unsigned int)hose->io_base_virt +
|
||||||
|
(address - hose->io_base_phys);
|
||||||
|
}
|
||||||
|
return (unsigned int)-1;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(pci_address_to_pio);
|
||||||
|
|
||||||
|
|
||||||
#define IOBASE_BRIDGE_NUMBER 0
|
#define IOBASE_BRIDGE_NUMBER 0
|
||||||
#define IOBASE_MEMORY 1
|
#define IOBASE_MEMORY 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user