2 * arch/arm/mach-ixp4xx/ixdp425-pci.c
4 * IXDP425 board-level PCI initialization
6 * Copyright (C) 2002 Intel Corporation.
7 * Copyright (C) 2003-2004 MontaVista Software, Inc.
9 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
17 #include <linux/kernel.h>
18 #include <linux/pci.h>
19 #include <linux/init.h>
20 #include <linux/delay.h>
22 #include <asm/mach/pci.h>
24 #include <asm/hardware.h>
25 #include <asm/mach-types.h>
27 void __init ixdp425_pci_preinit(void)
29 set_irq_type(IRQ_IXDP425_PCI_INTA, IRQT_LOW);
30 set_irq_type(IRQ_IXDP425_PCI_INTB, IRQT_LOW);
31 set_irq_type(IRQ_IXDP425_PCI_INTC, IRQT_LOW);
32 set_irq_type(IRQ_IXDP425_PCI_INTD, IRQT_LOW);
37 static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
39 static int pci_irq_table[IXDP425_PCI_IRQ_LINES] = {
48 if (slot >= 1 && slot <= IXDP425_PCI_MAX_DEV &&
49 pin >= 1 && pin <= IXDP425_PCI_IRQ_LINES) {
50 irq = pci_irq_table[(slot + pin - 2) % 4];
56 struct hw_pci ixdp425_pci __initdata = {
58 .preinit = ixdp425_pci_preinit,
59 .swizzle = pci_std_swizzle,
60 .setup = ixp4xx_setup,
61 .scan = ixp4xx_scan_bus,
62 .map_irq = ixdp425_map_irq,
65 int __init ixdp425_pci_init(void)
67 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
68 machine_is_avila() || machine_is_ixdp465())
69 pci_common_init(&ixdp425_pci);
73 subsys_initcall(ixdp425_pci_init);