OMAP3: SR: Reset voltage level on SR disable
[linux-ginger.git] / arch / arm / mach-ixp4xx / fsg-pci.c
blobca12a9ca083045f479409d0a5172a88ab5eb529e
1 /*
2 * arch/arch/mach-ixp4xx/fsg-pci.c
4 * FSG board-level PCI initialization
6 * Author: Rod Whitby <rod@whitby.id.au>
7 * Maintainer: http://www.nslu2-linux.org/
9 * based on ixdp425-pci.c:
10 * Copyright (C) 2002 Intel Corporation.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
19 #include <linux/pci.h>
20 #include <linux/init.h>
21 #include <linux/irq.h>
23 #include <asm/mach/pci.h>
24 #include <asm/mach-types.h>
26 void __init fsg_pci_preinit(void)
28 set_irq_type(IRQ_FSG_PCI_INTA, IRQ_TYPE_LEVEL_LOW);
29 set_irq_type(IRQ_FSG_PCI_INTB, IRQ_TYPE_LEVEL_LOW);
30 set_irq_type(IRQ_FSG_PCI_INTC, IRQ_TYPE_LEVEL_LOW);
32 ixp4xx_pci_preinit();
35 static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
37 static int pci_irq_table[FSG_PCI_IRQ_LINES] = {
38 IRQ_FSG_PCI_INTC,
39 IRQ_FSG_PCI_INTB,
40 IRQ_FSG_PCI_INTA,
43 int irq = -1;
44 slot = slot - 11;
46 if (slot >= 1 && slot <= FSG_PCI_MAX_DEV &&
47 pin >= 1 && pin <= FSG_PCI_IRQ_LINES)
48 irq = pci_irq_table[(slot - 1)];
49 printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n",
50 __func__, slot, pin, irq);
52 return irq;
55 struct hw_pci fsg_pci __initdata = {
56 .nr_controllers = 1,
57 .preinit = fsg_pci_preinit,
58 .swizzle = pci_std_swizzle,
59 .setup = ixp4xx_setup,
60 .scan = ixp4xx_scan_bus,
61 .map_irq = fsg_map_irq,
64 int __init fsg_pci_init(void)
66 if (machine_is_fsg())
67 pci_common_init(&fsg_pci);
68 return 0;
71 subsys_initcall(fsg_pci_init);