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