aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/pci.c
diff options
context:
space:
mode:
authorPer Andersson <avtobiff@gmail.com>2008-08-11 06:00:52 -0400
committerNicolas Pitre <nico@cam.org>2008-08-21 22:15:17 -0400
commit7a6bb2622692495d1b7445a3e8c257601b803b02 (patch)
tree5735707076af1295aa6ef9be2413dfab291bd6da /arch/arm/mach-orion5x/pci.c
parent6a55617ed5d1aa62b850de2cf66f5ede2eef4825 (diff)
[ARM] Orion: Fix boot crash on Kurobox Pro
The Kurobox Pro crashes when any of the PCI controller registers are accessed. This patch adds a function to the Orion PCI handling code that board support code can call to disable enumerating the PCI bus entirely, and makes the Kurobox Pro PCI-related init code call this function. Signed-off-by: Per Andersson <avtobiff@gmail.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x/pci.c')
-rw-r--r--arch/arm/mach-orion5x/pci.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index fbceecc4b7e..a7b7d77b1b0 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -541,6 +541,13 @@ static void __devinit rc_pci_fixup(struct pci_dev *dev)
541} 541}
542DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); 542DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup);
543 543
544static int orion5x_pci_disabled __initdata;
545
546void __init orion5x_pci_disable(void)
547{
548 orion5x_pci_disabled = 1;
549}
550
544void __init orion5x_pci_set_cardbus_mode(void) 551void __init orion5x_pci_set_cardbus_mode(void)
545{ 552{
546 orion5x_pci_cardbus_mode = 1; 553 orion5x_pci_cardbus_mode = 1;
@@ -553,7 +560,7 @@ int __init orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys)
553 if (nr == 0) { 560 if (nr == 0) {
554 orion_pcie_set_local_bus_nr(PCIE_BASE, sys->busnr); 561 orion_pcie_set_local_bus_nr(PCIE_BASE, sys->busnr);
555 ret = pcie_setup(sys); 562 ret = pcie_setup(sys);
556 } else if (nr == 1) { 563 } else if (nr == 1 && !orion5x_pci_disabled) {
557 orion5x_pci_set_bus_nr(sys->busnr); 564 orion5x_pci_set_bus_nr(sys->busnr);
558 ret = pci_setup(sys); 565 ret = pci_setup(sys);
559 } 566 }
@@ -567,7 +574,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys
567 574
568 if (nr == 0) { 575 if (nr == 0) {
569 bus = pci_scan_bus(sys->busnr, &pcie_ops, sys); 576 bus = pci_scan_bus(sys->busnr, &pcie_ops, sys);
570 } else if (nr == 1) { 577 } else if (nr == 1 && !orion5x_pci_disabled) {
571 bus = pci_scan_bus(sys->busnr, &pci_ops, sys); 578 bus = pci_scan_bus(sys->busnr, &pci_ops, sys);
572 } else { 579 } else {
573 bus = NULL; 580 bus = NULL;
@@ -584,7 +591,7 @@ int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
584 /* 591 /*
585 * PCIe endpoint? 592 * PCIe endpoint?
586 */ 593 */
587 if (bus < orion5x_pci_local_bus_nr()) 594 if (orion5x_pci_disabled || bus < orion5x_pci_local_bus_nr())
588 return IRQ_ORION5X_PCIE0_INT; 595 return IRQ_ORION5X_PCIE0_INT;
589 596
590 return -1; 597 return -1;