]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-orion5x/pci.c
Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel
[linux-2.6-omap-h63xx.git] / arch / arm / mach-orion5x / pci.c
index fbceecc4b7ec1585cc8728b6a7089e4a08c3df76..a7b7d77b1b09198d0385cc6df9920f967ab1d785 100644 (file)
@@ -541,6 +541,13 @@ static void __devinit rc_pci_fixup(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
 
+static int orion5x_pci_disabled __initdata;
+
+void __init orion5x_pci_disable(void)
+{
+       orion5x_pci_disabled = 1;
+}
+
 void __init orion5x_pci_set_cardbus_mode(void)
 {
        orion5x_pci_cardbus_mode = 1;
@@ -553,7 +560,7 @@ int __init orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys)
        if (nr == 0) {
                orion_pcie_set_local_bus_nr(PCIE_BASE, sys->busnr);
                ret = pcie_setup(sys);
-       } else if (nr == 1) {
+       } else if (nr == 1 && !orion5x_pci_disabled) {
                orion5x_pci_set_bus_nr(sys->busnr);
                ret = pci_setup(sys);
        }
@@ -567,7 +574,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys
 
        if (nr == 0) {
                bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
-       } else if (nr == 1) {
+       } else if (nr == 1 && !orion5x_pci_disabled) {
                bus = pci_scan_bus(sys->busnr, &pci_ops, sys);
        } else {
                bus = NULL;
@@ -584,7 +591,7 @@ int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        /*
         * PCIe endpoint?
         */
-       if (bus < orion5x_pci_local_bus_nr())
+       if (orion5x_pci_disabled || bus < orion5x_pci_local_bus_nr())
                return IRQ_ORION5X_PCIE0_INT;
 
        return -1;