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