X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fmach-ixp2000%2Fenp2611.c;h=e4d2992d9427c0c0ff4cd9d173b30ea6795251a1;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=a6e30d079e21043527964e8d68bf7c0eea80cdc4;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index a6e30d079..e4d2992d9 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c @@ -26,9 +26,6 @@ #include #include #include -#include -#include -#include #include #include #include @@ -55,11 +52,16 @@ /************************************************************************* * ENP-2611 timer tick configuration *************************************************************************/ -static void __init enp2611_init_time(void) +static void __init enp2611_timer_init(void) { ixp2000_init_time(50 * 1000 * 1000); } +static struct sys_timer enp2611_timer = { + .init = enp2611_timer_init, + .offset = ixp2000_gettimeoffset, +}; + /************************************************************************* * ENP-2611 PCI @@ -122,20 +124,28 @@ static int __init enp2611_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { int irq; - if (dev->bus->number == 0x00 && PCI_SLOT(dev->devfn) == 0x01) { + if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) { + /* IXP2400. */ + irq = IRQ_IXP2000_PCIA; + } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) { /* 21555 non-transparent bridge. */ irq = IRQ_IXP2000_PCIB; - } else if (dev->bus->number == 0x01 && PCI_SLOT(dev->devfn) == 0x00) { + } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) { + /* PCI2050B transparent bridge. */ + irq = -1; + } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) { /* 82559 ethernet. */ irq = IRQ_IXP2000_PCIA; + } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) { + /* SPI-3 option board. */ + irq = IRQ_IXP2000_PCIB; } else { - printk(KERN_INFO "enp2611_pci_map_irq for unknown device\n"); - irq = IRQ_IXP2000_PCI; + printk(KERN_ERR "enp2611_pci_map_irq() called for unknown " + "device PCI:%d:%d:%d\n", dev->bus->number, + PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + irq = -1; } - printk(KERN_INFO "Assigned IRQ %d to PCI:%d:%d:%d\n", irq, - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); - return irq; } @@ -149,7 +159,9 @@ struct hw_pci enp2611_pci __initdata = { int __init enp2611_pci_init(void) { - pci_common_init(&enp2611_pci); + if (machine_is_enp2611()) + pci_common_init(&enp2611_pci); + return 0; } @@ -202,7 +214,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") BOOT_PARAMS(0x00000100) MAPIO(ixp2000_map_io) INITIRQ(ixp2000_init_irq) - INITTIME(enp2611_init_time) + .timer = &enp2611_timer, INIT_MACHINE(enp2611_init_machine) MACHINE_END #endif