aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/pci-common.c13
-rw-r--r--drivers/pci/pci.c5
-rw-r--r--drivers/pcmcia/cardbus.c2
-rw-r--r--include/linux/pci.h3
4 files changed, 22 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index e8dfdbd9327a..cadbed679fbb 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1107,6 +1107,12 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1107 list_for_each_entry(dev, &bus->devices, bus_list) { 1107 list_for_each_entry(dev, &bus->devices, bus_list) {
1108 struct dev_archdata *sd = &dev->dev.archdata; 1108 struct dev_archdata *sd = &dev->dev.archdata;
1109 1109
1110 /* Cardbus can call us to add new devices to a bus, so ignore
1111 * those who are already fully discovered
1112 */
1113 if (dev->is_added)
1114 continue;
1115
1110 /* Setup OF node pointer in archdata */ 1116 /* Setup OF node pointer in archdata */
1111 sd->of_node = pci_device_to_OF_node(dev); 1117 sd->of_node = pci_device_to_OF_node(dev);
1112 1118
@@ -1147,6 +1153,13 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1147} 1153}
1148EXPORT_SYMBOL(pcibios_fixup_bus); 1154EXPORT_SYMBOL(pcibios_fixup_bus);
1149 1155
1156void __devinit pci_fixup_cardbus(struct pci_bus *bus)
1157{
1158 /* Now fixup devices on that bus */
1159 pcibios_setup_bus_devices(bus);
1160}
1161
1162
1150static int skip_isa_ioresource_align(struct pci_dev *dev) 1163static int skip_isa_ioresource_align(struct pci_dev *dev)
1151{ 1164{
1152 if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) && 1165 if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d50522bf16b1..864e703cf737 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2798,6 +2798,11 @@ int __attribute__ ((weak)) pci_ext_cfg_avail(struct pci_dev *dev)
2798 return 1; 2798 return 1;
2799} 2799}
2800 2800
2801void __weak pci_fixup_cardbus(struct pci_bus *bus)
2802{
2803}
2804EXPORT_SYMBOL(pci_fixup_cardbus);
2805
2801static int __init pci_setup(char *str) 2806static int __init pci_setup(char *str)
2802{ 2807{
2803 while (str) { 2808 while (str) {
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index cdf50f3bc2df..d99f846451a3 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -222,7 +222,7 @@ int __ref cb_alloc(struct pcmcia_socket *s)
222 unsigned int max, pass; 222 unsigned int max, pass;
223 223
224 s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0)); 224 s->functions = pci_scan_slot(bus, PCI_DEVFN(0, 0));
225/* pcibios_fixup_bus(bus); */ 225 pci_fixup_cardbus(bus);
226 226
227 max = bus->secondary; 227 max = bus->secondary;
228 for (pass = 0; pass < 2; pass++) 228 for (pass = 0; pass < 2; pass++)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index bf1e67080849..5da0690d9cee 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -566,6 +566,9 @@ void pcibios_align_resource(void *, struct resource *, resource_size_t,
566 resource_size_t); 566 resource_size_t);
567void pcibios_update_irq(struct pci_dev *, int irq); 567void pcibios_update_irq(struct pci_dev *, int irq);
568 568
569/* Weak but can be overriden by arch */
570void pci_fixup_cardbus(struct pci_bus *);
571
569/* Generic PCI functions used internally */ 572/* Generic PCI functions used internally */
570 573
571extern struct pci_bus *pci_find_bus(int domain, int busnr); 574extern struct pci_bus *pci_find_bus(int domain, int busnr);