2 * arch/arm/mach-ixp4xx/ixdp425-pci.c
4 * ESS710 board-level PCI initialization
5 * Copyright (C) 2004 SnapGear - A CyberGuard Company
7 * Copyright (C) 2002 Intel Corporation.
8 * Copyright (C) 2003-2004 MontaVista Software, Inc.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
16 #include <linux/pci.h>
17 #include <linux/init.h>
18 #include <linux/delay.h>
19 #include <linux/irq.h>
20 #include <asm/mach/pci.h>
22 #include <asm/hardware.h>
23 #include <asm/mach-types.h>
25 void __init
ess710_pci_preinit(void)
27 printk("PCI: reset bus...\n");
29 gpio_line_config(13, IXP4XX_GPIO_OUT
);
35 gpio_line_config(6, IXP4XX_GPIO_IN
);
36 set_irq_type(IRQ_IXP4XX_GPIO6
, IRQT_LOW
); /* INTA */
37 gpio_line_config(7, IXP4XX_GPIO_IN
);
38 set_irq_type(IRQ_IXP4XX_GPIO7
, IRQT_LOW
); /* INTB */
39 gpio_line_config(8, IXP4XX_GPIO_IN
);
40 set_irq_type(IRQ_IXP4XX_GPIO8
, IRQT_LOW
); /* INTC */
45 static int __init
ess710_map_irq(struct pci_dev
*dev
, u8 slot
, u8 pin
)
48 return IRQ_ESS710_PCI_INTA
;
50 return IRQ_ESS710_PCI_INTB
;
52 return IRQ_ESS710_PCI_INTC
;
54 return IRQ_ESS710_PCI_INTC
;
58 struct hw_pci ess710_pci __initdata
= {
60 .preinit
= ess710_pci_preinit
,
61 .swizzle
= pci_std_swizzle
,
62 .setup
= ixp4xx_setup
,
63 .scan
= ixp4xx_scan_bus
,
64 .map_irq
= ess710_map_irq
,
67 int __init
ess710_pci_init(void)
69 if (machine_is_ess710())
70 pci_common_init(&ess710_pci
);
74 subsys_initcall(ess710_pci_init
);