aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:18:39 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-19 16:18:39 -0500
commit59b8175c771040afcd4ad67022b0cc80c216b866 (patch)
tree4ef5935bee1e342716d49b9d4b99e3fa835526e6 /arch/arm/mach-ixp4xx
parent920841d8d1d61bc12b43f95a579a5374f6d98f81 (diff)
parent3b0eb4a195a124567cd0dd6f700f8388def542c6 (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: (117 commits) [ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports [ARM] 4140/1: AACI stability add ac97 timeout and retries [ARM] 4139/1: AACI record support [ARM] 4138/1: AACI: multiple channel support for IRQ handling [ARM] 4211/1: Provide a defconfig for ns9xxx [ARM] 4210/1: base for new machine type "NetSilicon NS9360" [ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM [ARM] 4221/1: S3C2443: DMA support [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev [ARM] 4219/1: S3C2443: DMA source definitions [ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443 [ARM] 4217/1: S3C24XX: remove the dma channel show at startup [ARM] 4090/2: avoid clash between PXA and SA1111 defines [ARM] 4216/1: add .gitignore entries for ARM specific files [ARM] 4214/2: S3C2410: Add Armzone QT2410 [ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST [ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos [ARM] 4137/1: Add kexec support [ARM] 4201/1: SMP barriers pair needed for the secondary boot process ... Fix up conflict due to typedef removal in sound/arm/aaci.h
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig12
-rw-r--r--arch/arm/mach-ixp4xx/Makefile2
-rw-r--r--arch/arm/mach-ixp4xx/avila-pci.c78
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c192
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c20
6 files changed, 283 insertions, 23 deletions
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index e316bd93313f..8a339cdfe222 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -17,7 +17,7 @@ config MACH_NSLU2
17 NSLU2 NAS device. For more information on this platform, 17 NSLU2 NAS device. For more information on this platform,
18 see http://www.nslu2-linux.org 18 see http://www.nslu2-linux.org
19 19
20config ARCH_AVILA 20config MACH_AVILA
21 bool "Avila" 21 bool "Avila"
22 select PCI 22 select PCI
23 help 23 help
@@ -25,6 +25,14 @@ config ARCH_AVILA
25 Avila Network Platform. For more information on this platform, 25 Avila Network Platform. For more information on this platform,
26 see <file:Documentation/arm/IXP4xx>. 26 see <file:Documentation/arm/IXP4xx>.
27 27
28config MACH_LOFT
29 bool "Loft"
30 depends on MACH_AVILA
31 help
32 Say 'Y' here if you want your kernel to support the Giant
33 Shoulder Inc Loft board (a minor variation on the standard
34 Gateworks Avila Network Platform).
35
28config ARCH_ADI_COYOTE 36config ARCH_ADI_COYOTE
29 bool "Coyote" 37 bool "Coyote"
30 select PCI 38 select PCI
@@ -86,7 +94,7 @@ config MACH_NAS100D
86# 94#
87config ARCH_IXDP4XX 95config ARCH_IXDP4XX
88 bool 96 bool
89 depends on ARCH_IXDP425 || ARCH_AVILA || MACH_IXDP465 97 depends on ARCH_IXDP425 || MACH_IXDP465
90 default y 98 default y
91 99
92# 100#
diff --git a/arch/arm/mach-ixp4xx/Makefile b/arch/arm/mach-ixp4xx/Makefile
index 640315d8b96a..746e297284ed 100644
--- a/arch/arm/mach-ixp4xx/Makefile
+++ b/arch/arm/mach-ixp4xx/Makefile
@@ -6,6 +6,7 @@ obj-pci-y :=
6obj-pci-n := 6obj-pci-n :=
7 7
8obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o 8obj-pci-$(CONFIG_ARCH_IXDP4XX) += ixdp425-pci.o
9obj-pci-$(CONFIG_MACH_AVILA) += avila-pci.o
9obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o 10obj-pci-$(CONFIG_MACH_IXDPG425) += ixdpg425-pci.o
10obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o 11obj-pci-$(CONFIG_ARCH_ADI_COYOTE) += coyote-pci.o
11obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o 12obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o
@@ -15,6 +16,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
15obj-y += common.o 16obj-y += common.o
16 17
17obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o 18obj-$(CONFIG_ARCH_IXDP4XX) += ixdp425-setup.o
19obj-$(CONFIG_MACH_AVILA) += avila-setup.o
18obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o 20obj-$(CONFIG_MACH_IXDPG425) += coyote-setup.o
19obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o 21obj-$(CONFIG_ARCH_ADI_COYOTE) += coyote-setup.o
20obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o 22obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c
new file mode 100644
index 000000000000..3f867691d9f2
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/avila-pci.c
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-ixp4xx/avila-pci.c
3 *
4 * Gateworks Avila board-level PCI initialization
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp-pci.c
9 * Copyright (C) 2002 Intel Corporation.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
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#include <linux/delay.h>
25
26#include <asm/mach/pci.h>
27#include <asm/irq.h>
28#include <asm/hardware.h>
29#include <asm/mach-types.h>
30
31void __init avila_pci_preinit(void)
32{
33 set_irq_type(IRQ_AVILA_PCI_INTA, IRQT_LOW);
34 set_irq_type(IRQ_AVILA_PCI_INTB, IRQT_LOW);
35 set_irq_type(IRQ_AVILA_PCI_INTC, IRQT_LOW);
36 set_irq_type(IRQ_AVILA_PCI_INTD, IRQT_LOW);
37
38 ixp4xx_pci_preinit();
39}
40
41static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
42{
43 static int pci_irq_table[AVILA_PCI_IRQ_LINES] = {
44 IRQ_AVILA_PCI_INTA,
45 IRQ_AVILA_PCI_INTB,
46 IRQ_AVILA_PCI_INTC,
47 IRQ_AVILA_PCI_INTD
48 };
49
50 int irq = -1;
51
52 if (slot >= 1 &&
53 slot <= (machine_is_loft() ? LOFT_PCI_MAX_DEV : AVILA_PCI_MAX_DEV) &&
54 pin >= 1 && pin <= AVILA_PCI_IRQ_LINES) {
55 irq = pci_irq_table[(slot + pin - 2) % 4];
56 }
57
58 return irq;
59}
60
61struct hw_pci avila_pci __initdata = {
62 .nr_controllers = 1,
63 .preinit = avila_pci_preinit,
64 .swizzle = pci_std_swizzle,
65 .setup = ixp4xx_setup,
66 .scan = ixp4xx_scan_bus,
67 .map_irq = avila_map_irq,
68};
69
70int __init avila_pci_init(void)
71{
72 if (machine_is_avila() || machine_is_loft())
73 pci_common_init(&avila_pci);
74 return 0;
75}
76
77subsys_initcall(avila_pci_init);
78
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
new file mode 100644
index 000000000000..d59b8dc7dc7a
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -0,0 +1,192 @@
1/*
2 * arch/arm/mach-ixp4xx/avila-setup.c
3 *
4 * Gateworks Avila board-setup
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp-setup.c
9 * Copyright (C) 2003-2005 MontaVista Software, Inc.
10 *
11 * Author: Deepak Saxena <dsaxena@plexity.net>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/device.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/slab.h>
21
22#include <asm/types.h>
23#include <asm/setup.h>
24#include <asm/memory.h>
25#include <asm/hardware.h>
26#include <asm/mach-types.h>
27#include <asm/irq.h>
28#include <asm/mach/arch.h>
29#include <asm/mach/flash.h>
30
31static struct flash_platform_data avila_flash_data = {
32 .map_name = "cfi_probe",
33 .width = 2,
34};
35
36static struct resource avila_flash_resource = {
37 .flags = IORESOURCE_MEM,
38};
39
40static struct platform_device avila_flash = {
41 .name = "IXP4XX-Flash",
42 .id = 0,
43 .dev = {
44 .platform_data = &avila_flash_data,
45 },
46 .num_resources = 1,
47 .resource = &avila_flash_resource,
48};
49
50static struct ixp4xx_i2c_pins avila_i2c_gpio_pins = {
51 .sda_pin = AVILA_SDA_PIN,
52 .scl_pin = AVILA_SCL_PIN,
53};
54
55static struct platform_device avila_i2c_controller = {
56 .name = "IXP4XX-I2C",
57 .id = 0,
58 .dev = {
59 .platform_data = &avila_i2c_gpio_pins,
60 },
61 .num_resources = 0
62};
63
64static struct resource avila_uart_resources[] = {
65 {
66 .start = IXP4XX_UART1_BASE_PHYS,
67 .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
68 .flags = IORESOURCE_MEM
69 },
70 {
71 .start = IXP4XX_UART2_BASE_PHYS,
72 .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
73 .flags = IORESOURCE_MEM
74 }
75};
76
77static struct plat_serial8250_port avila_uart_data[] = {
78 {
79 .mapbase = IXP4XX_UART1_BASE_PHYS,
80 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
81 .irq = IRQ_IXP4XX_UART1,
82 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
83 .iotype = UPIO_MEM,
84 .regshift = 2,
85 .uartclk = IXP4XX_UART_XTAL,
86 },
87 {
88 .mapbase = IXP4XX_UART2_BASE_PHYS,
89 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
90 .irq = IRQ_IXP4XX_UART2,
91 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
92 .iotype = UPIO_MEM,
93 .regshift = 2,
94 .uartclk = IXP4XX_UART_XTAL,
95 },
96 { },
97};
98
99static struct platform_device avila_uart = {
100 .name = "serial8250",
101 .id = PLAT8250_DEV_PLATFORM,
102 .dev.platform_data = avila_uart_data,
103 .num_resources = 2,
104 .resource = avila_uart_resources
105};
106
107static struct resource avila_pata_resources[] = {
108 {
109 .flags = IORESOURCE_MEM
110 },
111 {
112 .flags = IORESOURCE_MEM,
113 },
114 {
115 .name = "intrq",
116 .start = IRQ_IXP4XX_GPIO12,
117 .end = IRQ_IXP4XX_GPIO12,
118 .flags = IORESOURCE_IRQ,
119 },
120};
121
122static struct ixp4xx_pata_data avila_pata_data = {
123 .cs0_bits = 0xbfff0043,
124 .cs1_bits = 0xbfff0043,
125};
126
127static struct platform_device avila_pata = {
128 .name = "pata_ixp4xx_cf",
129 .id = 0,
130 .dev.platform_data = &avila_pata_data,
131 .num_resources = ARRAY_SIZE(avila_pata_resources),
132 .resource = avila_pata_resources,
133};
134
135static struct platform_device *avila_devices[] __initdata = {
136 &avila_i2c_controller,
137 &avila_flash,
138 &avila_uart
139};
140
141static void __init avila_init(void)
142{
143 ixp4xx_sys_init();
144
145 avila_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
146 avila_flash_resource.end =
147 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
148
149 platform_add_devices(avila_devices, ARRAY_SIZE(avila_devices));
150
151 avila_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
152 avila_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
153
154 avila_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
155 avila_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
156
157 avila_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
158 avila_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
159
160 platform_device_register(&avila_pata);
161
162}
163
164MACHINE_START(AVILA, "Gateworks Avila Network Platform")
165 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
166 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
167 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
168 .map_io = ixp4xx_map_io,
169 .init_irq = ixp4xx_init_irq,
170 .timer = &ixp4xx_timer,
171 .boot_params = 0x0100,
172 .init_machine = avila_init,
173MACHINE_END
174
175 /*
176 * Loft is functionally equivalent to Avila except that it has a
177 * different number for the maximum PCI devices. The MACHINE
178 * structure below is identical to Avila except for the comment.
179 */
180#ifdef CONFIG_MACH_LOFT
181MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
182 /* Maintainer: Tom Billman <kernel@giantshoulderinc.com> */
183 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
184 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
185 .map_io = ixp4xx_map_io,
186 .init_irq = ixp4xx_init_irq,
187 .timer = &ixp4xx_timer,
188 .boot_params = 0x0100,
189 .init_machine = avila_init,
190MACHINE_END
191#endif
192
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index d5156c043f0b..99c1dc8033c8 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -66,7 +66,7 @@ struct hw_pci ixdp425_pci __initdata = {
66int __init ixdp425_pci_init(void) 66int __init ixdp425_pci_init(void)
67{ 67{
68 if (machine_is_ixdp425() || machine_is_ixcdp1100() || 68 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
69 machine_is_avila() || machine_is_ixdp465()) 69 machine_is_ixdp465())
70 pci_common_init(&ixdp425_pci); 70 pci_common_init(&ixdp425_pci);
71 return 0; 71 return 0;
72} 72}
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index da72383ee301..04b1d56396a0 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -156,23 +156,3 @@ MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
156 .init_machine = ixdp425_init, 156 .init_machine = ixdp425_init,
157MACHINE_END 157MACHINE_END
158#endif 158#endif
159
160/*
161 * Avila is functionally equivalent to IXDP425 except that it adds
162 * a CF IDE slot hanging off the expansion bus. When we have a
163 * driver for IXP4xx CF IDE with driver model support we'll move
164 * Avila to it's own setup file.
165 */
166#ifdef CONFIG_ARCH_AVILA
167MACHINE_START(AVILA, "Gateworks Avila Network Platform")
168 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
169 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
170 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
171 .map_io = ixp4xx_map_io,
172 .init_irq = ixp4xx_init_irq,
173 .timer = &ixp4xx_timer,
174 .boot_params = 0x0100,
175 .init_machine = ixdp425_init,
176MACHINE_END
177#endif
178