]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/alpha/kernel/sys_nautilus.c
alpha: nautilus - fix hang on boot
[linux-2.6-omap-h63xx.git] / arch / alpha / kernel / sys_nautilus.c
index 93744bab73fb24ac63d6ba9406a4a3c4d0a294fb..99c0f46f6b9cc75007499c10f4fb84f8a2c6d1ee 100644 (file)
@@ -70,6 +70,12 @@ nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        /* Preserve the IRQ set up by the console.  */
 
        u8 irq;
+       /* UP1500: AGP INTA is actually routed to IRQ 5, not IRQ 10 as
+          console reports. Check the device id of AGP bridge to distinguish
+          UP1500 from UP1000/1100. Note: 'pin' is 2 due to bridge swizzle. */
+       if (slot == 1 && pin == 2 &&
+           dev->bus->self && dev->bus->self->device == 0x700f)
+               return 5;
        pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
        return irq;
 }
@@ -181,6 +187,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr)
 }
 
 extern void free_reserved_mem(void *, void *);
+extern void pcibios_claim_one_bus(struct pci_bus *);
 
 static struct resource irongate_mem = {
        .name   = "Irongate PCI MEM",
@@ -199,8 +206,9 @@ nautilus_init_pci(void)
        /* Scan our single hose.  */
        bus = pci_scan_bus(0, alpha_mv.pci_ops, hose);
        hose->bus = bus;
+       pcibios_claim_one_bus(bus);
 
-       irongate = pci_find_slot(0, 0);
+       irongate = pci_get_bus_and_slot(0, 0);
        bus->self = irongate;
        bus->resource[1] = &irongate_mem;
 
@@ -237,6 +245,10 @@ nautilus_init_pci(void)
                IRONGATE0->pci_mem = pci_mem;
 
        pci_bus_assign_resources(bus);
+
+       /* pci_common_swizzle() relies on bus->self being NULL
+          for the root bus, so just clear it. */
+       bus->self = NULL;
        pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq);
 }