aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/gateway7001-pci.c
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2007-06-02 10:44:08 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-12 06:12:15 -0400
commit46918bd13b887e8f0ae2987e690bc2af9c6c08a4 (patch)
tree14d0969bbd89c94848fb0f59249310746d06acda /arch/arm/mach-ixp4xx/gateway7001-pci.c
parent4ad48b4bfa121a67ec04162d584afcfa75ed151a (diff)
[ARM] 4425/2: Gateway 7001 series support
This patch provides support for the Gateway 7001 AccessPoint series. Updated to stay below the 80 char limit in uncompress.h Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: Deepak Saxena <dsaxena@mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/gateway7001-pci.c')
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-pci.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c
new file mode 100644
index 000000000000..4f2eeb050314
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c
@@ -0,0 +1,64 @@
1/*
2 * arch/arch/mach-ixp4xx/gateway7001-pci.c
3 *
4 * PCI setup routines for Gateway 7001
5 *
6 * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
7 *
8 * based on coyote-pci.c:
9 * Copyright (C) 2002 Jungo Software Technologies.
10 * Copyright (C) 2003 MontaVista Softwrae, Inc.
11 *
12 * Maintainer: Imre Kaloz <kaloz@openwrt.org>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 *
18 */
19
20#include <linux/kernel.h>
21#include <linux/pci.h>
22#include <linux/init.h>
23#include <linux/irq.h>
24
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27#include <asm/irq.h>
28
29#include <asm/mach/pci.h>
30
31void __init gateway7001_pci_preinit(void)
32{
33 set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
34 set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
35
36 ixp4xx_pci_preinit();
37}
38
39static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
40{
41 if (slot == 1)
42 return IRQ_IXP4XX_GPIO11;
43 else if (slot == 2)
44 return IRQ_IXP4XX_GPIO10;
45 else return -1;
46}
47
48struct hw_pci gateway7001_pci __initdata = {
49 .nr_controllers = 1,
50 .preinit = gateway7001_pci_preinit,
51 .swizzle = pci_std_swizzle,
52 .setup = ixp4xx_setup,
53 .scan = ixp4xx_scan_bus,
54 .map_irq = gateway7001_map_irq,
55};
56
57int __init gateway7001_pci_init(void)
58{
59 if (machine_is_gateway7001())
60 pci_common_init(&gateway7001_pci);
61 return 0;
62}
63
64subsys_initcall(gateway7001_pci_init);