diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-06 16:20:10 -0400 |
commit | c6799ade4ae04b53a5f677e5289116155ff01574 (patch) | |
tree | 3601b5e2387e39d62c207e4268c6cc5c68f2a364 /arch/arm/mach-ixp4xx/dsmg600-pci.c | |
parent | b7405e16435f710edfae6ba32bef4ca20d3de145 (diff) | |
parent | 5cd47155155a32e5b944ac9fc3f3dc578e429aa0 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (82 commits)
[ARM] Add comments marking in-use ptrace numbers
[ARM] Move syscall saving out of the way of utrace
[ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro
[ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header
[ARM] mm 10: allow memory type to be specified with ioremap
[ARM] mm 9: add additional device memory types
[ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6
[ARM] iop: add missing parens in macro
[ARM] mm 7: remove duplicated __ioremap() prototypes
ARM: OMAP: fix OMAP1 mpuio suspend/resume oops
ARM: OMAP: MPUIO wake updates
ARM: OMAP: speed up gpio irq handling
ARM: OMAP: plat-omap changes for 2430 SDP
ARM: OMAP: gpio object shrinkage, cleanup
ARM: OMAP: /sys/kernel/debug/omap_gpio
ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon
ARM: OMAP: Enable 24xx GPIO autoidling
[ARM] 4318/2: DSM-G600 Board Support
[ARM] 4227/1: minor head.S fixups
[ARM] 4328/1: Move i.MX UART regs to driver
...
Diffstat (limited to 'arch/arm/mach-ixp4xx/dsmg600-pci.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/dsmg600-pci.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c new file mode 100644 index 000000000000..9db7e1f42011 --- /dev/null +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
@@ -0,0 +1,74 @@ | |||
1 | /* | ||
2 | * DSM-G600 board-level PCI initialization | ||
3 | * | ||
4 | * Copyright (C) 2006 Tower Technologies | ||
5 | * Author: Alessandro Zummo <a.zummo@towertech.it> | ||
6 | * | ||
7 | * based on ixdp425-pci.c: | ||
8 | * Copyright (C) 2002 Intel Corporation. | ||
9 | * Copyright (C) 2003-2004 MontaVista Software, Inc. | ||
10 | * | ||
11 | * Maintainer: http://www.nslu2-linux.org/ | ||
12 | * | ||
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. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/pci.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/irq.h> | ||
22 | |||
23 | #include <asm/mach/pci.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | |||
26 | void __init dsmg600_pci_preinit(void) | ||
27 | { | ||
28 | set_irq_type(IRQ_DSMG600_PCI_INTA, IRQT_LOW); | ||
29 | set_irq_type(IRQ_DSMG600_PCI_INTB, IRQT_LOW); | ||
30 | set_irq_type(IRQ_DSMG600_PCI_INTC, IRQT_LOW); | ||
31 | set_irq_type(IRQ_DSMG600_PCI_INTD, IRQT_LOW); | ||
32 | set_irq_type(IRQ_DSMG600_PCI_INTE, IRQT_LOW); | ||
33 | set_irq_type(IRQ_DSMG600_PCI_INTF, IRQT_LOW); | ||
34 | |||
35 | ixp4xx_pci_preinit(); | ||
36 | } | ||
37 | |||
38 | static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
39 | { | ||
40 | static int pci_irq_table[DSMG600_PCI_MAX_DEV][DSMG600_PCI_IRQ_LINES] = | ||
41 | { | ||
42 | { IRQ_DSMG600_PCI_INTE, -1, -1 }, | ||
43 | { IRQ_DSMG600_PCI_INTA, -1, -1 }, | ||
44 | { IRQ_DSMG600_PCI_INTB, IRQ_DSMG600_PCI_INTC, IRQ_DSMG600_PCI_INTD }, | ||
45 | { IRQ_DSMG600_PCI_INTF, -1, -1 }, | ||
46 | }; | ||
47 | |||
48 | int irq = -1; | ||
49 | |||
50 | if (slot >= 1 && slot <= DSMG600_PCI_MAX_DEV && | ||
51 | pin >= 1 && pin <= DSMG600_PCI_IRQ_LINES) | ||
52 | irq = pci_irq_table[slot-1][pin-1]; | ||
53 | |||
54 | return irq; | ||
55 | } | ||
56 | |||
57 | struct hw_pci __initdata dsmg600_pci = { | ||
58 | .nr_controllers = 1, | ||
59 | .preinit = dsmg600_pci_preinit, | ||
60 | .swizzle = pci_std_swizzle, | ||
61 | .setup = ixp4xx_setup, | ||
62 | .scan = ixp4xx_scan_bus, | ||
63 | .map_irq = dsmg600_map_irq, | ||
64 | }; | ||
65 | |||
66 | int __init dsmg600_pci_init(void) | ||
67 | { | ||
68 | if (machine_is_dsmg600()) | ||
69 | pci_common_init(&dsmg600_pci); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | |||
74 | subsys_initcall(dsmg600_pci_init); | ||