strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[openwrt/staging/florian.git] / target / linux / ixp4xx / patches / 500-compex.patch
1 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/compex-setup.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/compex-setup.c
2 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/compex-setup.c 1970-01-01 01:00:00.000000000 +0100
3 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/compex-setup.c 2007-04-10 01:56:21.000000000 +0200
4 @@ -0,0 +1,120 @@
5 +/*
6 + * arch/arm/mach-ixp4xx/compex-setup.c
7 + *
8 + * Ccompex WP18 / NP18A board-setup
9 + *
10 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
11 + *
12 + * based on ixdp425-setup.c:
13 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
14 + *
15 + * Author: Imre Kaloz <Kaloz@openwrt.org>
16 + */
17 +
18 +#include <linux/kernel.h>
19 +#include <linux/init.h>
20 +#include <linux/device.h>
21 +#include <linux/serial.h>
22 +#include <linux/tty.h>
23 +#include <linux/serial_8250.h>
24 +#include <linux/slab.h>
25 +
26 +#include <asm/types.h>
27 +#include <asm/setup.h>
28 +#include <asm/memory.h>
29 +#include <asm/hardware.h>
30 +#include <asm/mach-types.h>
31 +#include <asm/irq.h>
32 +#include <asm/mach/arch.h>
33 +#include <asm/mach/flash.h>
34 +
35 +static struct flash_platform_data compex_flash_data = {
36 + .map_name = "cfi_probe",
37 + .width = 2,
38 +};
39 +
40 +static struct resource compex_flash_resource = {
41 + .flags = IORESOURCE_MEM,
42 +};
43 +
44 +static struct platform_device compex_flash = {
45 + .name = "IXP4XX-Flash",
46 + .id = 0,
47 + .dev = {
48 + .platform_data = &compex_flash_data,
49 + },
50 + .num_resources = 1,
51 + .resource = &compex_flash_resource,
52 +};
53 +
54 +static struct resource compex_uart_resources[] = {
55 + {
56 + .start = IXP4XX_UART1_BASE_PHYS,
57 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
58 + .flags = IORESOURCE_MEM
59 + },
60 + {
61 + .start = IXP4XX_UART2_BASE_PHYS,
62 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
63 + .flags = IORESOURCE_MEM
64 + }
65 +};
66 +
67 +static struct plat_serial8250_port compex_uart_data[] = {
68 + {
69 + .mapbase = IXP4XX_UART1_BASE_PHYS,
70 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
71 + .irq = IRQ_IXP4XX_UART1,
72 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
73 + .iotype = UPIO_MEM,
74 + .regshift = 2,
75 + .uartclk = IXP4XX_UART_XTAL,
76 + },
77 + {
78 + .mapbase = IXP4XX_UART2_BASE_PHYS,
79 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
80 + .irq = IRQ_IXP4XX_UART2,
81 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
82 + .iotype = UPIO_MEM,
83 + .regshift = 2,
84 + .uartclk = IXP4XX_UART_XTAL,
85 + },
86 + { },
87 +};
88 +
89 +static struct platform_device compex_uart = {
90 + .name = "serial8250",
91 + .id = PLAT8250_DEV_PLATFORM,
92 + .dev.platform_data = compex_uart_data,
93 + .num_resources = 2,
94 + .resource = compex_uart_resources
95 +};
96 +
97 +static struct platform_device *compex_devices[] __initdata = {
98 + &compex_flash,
99 + &compex_uart
100 +};
101 +
102 +static void __init compex_init(void)
103 +{
104 + ixp4xx_sys_init();
105 +
106 + compex_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
107 + compex_flash_resource.end =
108 + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
109 +
110 + platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices));
111 +}
112 +
113 +#ifdef CONFIG_MACH_COMPEX
114 +MACHINE_START(COMPEX, "Compex WP18 / NP18A")
115 + /* Maintainer: Imre Kaloz <Kaloz@openwrt.org> */
116 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
117 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
118 + .map_io = ixp4xx_map_io,
119 + .init_irq = ixp4xx_init_irq,
120 + .timer = &ixp4xx_timer,
121 + .boot_params = 0x0100,
122 + .init_machine = compex_init,
123 +MACHINE_END
124 +#endif
125 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-pci.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c
126 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-01-10 20:10:37.000000000 +0100
127 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-04-10 00:22:16.000000000 +0200
128 @@ -66,7 +66,7 @@
129 int __init ixdp425_pci_init(void)
130 {
131 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
132 - machine_is_ixdp465())
133 + machine_is_ixdp465() || machine_is_compex())
134 pci_common_init(&ixdp425_pci);
135 return 0;
136 }
137 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig
138 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig 2007-04-10 00:33:31.000000000 +0200
139 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-04-10 00:48:37.000000000 +0200
140 @@ -57,6 +57,14 @@
141 Engineering Pronghorn Metro Platform. For more
142 information on this platform, see <file:Documentation/arm/IXP4xx>.
143
144 +config MACH_COMPEX
145 + bool "Compex WP18 / NP18A"
146 + select PCI
147 + help
148 + Say 'Y' here if you want your kernel to support Compex'
149 + WP18 or NP18A boards. For more information on this
150 + platform, see http://openwrt.org
151 +
152 config ARCH_IXDP425
153 bool "IXDP425"
154 help
155 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile
156 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile 2007-04-10 00:33:39.000000000 +0200
157 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile 2007-04-09 20:23:06.000000000 +0200
158 @@ -14,6 +14,7 @@
159 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
160 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
161 obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
162 +obj-pci-$(CONFIG_MACH_COMPEX) += ixdp425-pci.o
163
164 obj-y += common.o
165
166 @@ -26,5 +27,6 @@
167 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
168 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
169 obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
170 +obj-$(CONFIG_MACH_COMPEX) += compex-setup.o
171
172 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
173 diff -Nur linux-2.6.19.2/arch/arm/tools/mach-types linux-2.6.19.2-owrt/arch/arm/tools/mach-types
174 --- linux-2.6.19.2/arch/arm/tools/mach-types 2007-04-10 01:27:55.000000000 +0200
175 +++ linux-2.6.19.2-owrt/arch/arm/tools/mach-types 2007-04-09 20:22:33.000000000 +0200
176 @@ -1278,7 +1278,7 @@
177 smdk6400 MACH_SMDK6400 SMDK6400 1270
178 nokia_n800 MACH_NOKIA_N800 NOKIA_N800 1271
179 greenphone MACH_GREENPHONE GREENPHONE 1272
180 -compex42x MACH_COMPEXWP18 COMPEXWP18 1273
181 +compex MACH_COMPEX COMPEX 1273
182 xmate MACH_XMATE XMATE 1274
183 energizer MACH_ENERGIZER ENERGIZER 1275
184 ime1 MACH_IME1 IME1 1276