1 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/compex-setup.c
2 ===================================================================
4 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/compex-setup.c
7 + * arch/arm/mach-ixp4xx/compex-setup.c
9 + * Ccompex WP18 / NP18A board-setup
11 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
13 + * based on ixdp425-setup.c:
14 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
16 + * Author: Imre Kaloz <Kaloz@openwrt.org>
19 +#include <linux/kernel.h>
20 +#include <linux/init.h>
21 +#include <linux/device.h>
22 +#include <linux/serial.h>
23 +#include <linux/tty.h>
24 +#include <linux/serial_8250.h>
25 +#include <linux/slab.h>
27 +#include <asm/types.h>
28 +#include <asm/setup.h>
29 +#include <asm/memory.h>
30 +#include <asm/hardware.h>
31 +#include <asm/mach-types.h>
33 +#include <asm/mach/arch.h>
34 +#include <asm/mach/flash.h>
36 +static struct flash_platform_data compex_flash_data = {
37 + .map_name = "cfi_probe",
41 +static struct resource compex_flash_resource = {
42 + .flags = IORESOURCE_MEM,
45 +static struct platform_device compex_flash = {
46 + .name = "IXP4XX-Flash",
49 + .platform_data = &compex_flash_data,
52 + .resource = &compex_flash_resource,
55 +static struct resource compex_uart_resources[] = {
57 + .start = IXP4XX_UART1_BASE_PHYS,
58 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
59 + .flags = IORESOURCE_MEM
62 + .start = IXP4XX_UART2_BASE_PHYS,
63 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
64 + .flags = IORESOURCE_MEM
68 +static struct plat_serial8250_port compex_uart_data[] = {
70 + .mapbase = IXP4XX_UART1_BASE_PHYS,
71 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
72 + .irq = IRQ_IXP4XX_UART1,
73 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
76 + .uartclk = IXP4XX_UART_XTAL,
79 + .mapbase = IXP4XX_UART2_BASE_PHYS,
80 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
81 + .irq = IRQ_IXP4XX_UART2,
82 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
85 + .uartclk = IXP4XX_UART_XTAL,
90 +static struct platform_device compex_uart = {
91 + .name = "serial8250",
92 + .id = PLAT8250_DEV_PLATFORM,
93 + .dev.platform_data = compex_uart_data,
95 + .resource = compex_uart_resources
98 +static struct platform_device *compex_devices[] __initdata = {
103 +static void __init compex_init(void)
107 + compex_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
108 + compex_flash_resource.end =
109 + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
111 + platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices));
114 +#ifdef CONFIG_MACH_COMPEX
115 +MACHINE_START(COMPEX, "Compex WP18 / NP18A")
116 + /* Maintainer: Imre Kaloz <Kaloz@openwrt.org> */
117 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
118 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
119 + .map_io = ixp4xx_map_io,
120 + .init_irq = ixp4xx_init_irq,
121 + .timer = &ixp4xx_timer,
122 + .boot_params = 0x0100,
123 + .init_machine = compex_init,
126 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/ixdp425-pci.c
127 ===================================================================
128 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/ixdp425-pci.c
129 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/ixdp425-pci.c
130 @@ -66,7 +66,7 @@ struct hw_pci ixdp425_pci __initdata = {
131 int __init ixdp425_pci_init(void)
133 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
134 - machine_is_ixdp465())
135 + machine_is_ixdp465() || machine_is_compex())
136 pci_common_init(&ixdp425_pci);
139 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
140 ===================================================================
141 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Kconfig
142 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
143 @@ -65,6 +65,14 @@ config MACH_PRONGHORNMETRO
144 Engineering Pronghorn Metro Platform. For more
145 information on this platform, see <file:Documentation/arm/IXP4xx>.
148 + bool "Compex WP18 / NP18A"
151 + Say 'Y' here if you want your kernel to support Compex'
152 + WP18 or NP18A boards. For more information on this
153 + platform, see http://openwrt.org
158 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
159 ===================================================================
160 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Makefile
161 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
162 @@ -16,6 +16,7 @@ obj-pci-$(CONFIG_MACH_DSMG600) += dsmg6
163 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
164 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
165 obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
166 +obj-pci-$(CONFIG_MACH_COMPEX) += ixdp425-pci.o
170 @@ -30,5 +31,6 @@ obj-$(CONFIG_MACH_DSMG600) += dsmg6
171 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
172 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
173 obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
174 +obj-$(CONFIG_MACH_COMPEX) += compex-setup.o
176 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
177 Index: linux-2.6.21.7/arch/arm/tools/mach-types
178 ===================================================================
179 --- linux-2.6.21.7.orig/arch/arm/tools/mach-types
180 +++ linux-2.6.21.7/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