1 Index: linux-2.6.24/arch/arm/mach-ixp4xx/Kconfig
2 ===================================================================
3 --- linux-2.6.24.orig/arch/arm/mach-ixp4xx/Kconfig 2008-03-12 21:21:26.000000000 +1030
4 +++ linux-2.6.24/arch/arm/mach-ixp4xx/Kconfig 2008-03-12 21:21:26.000000000 +1030
6 Engineering Pronghorn Metro Platform. For more
7 information on this platform, see <file:Documentation/arm/IXP4xx>.
10 + bool "Compex WP18 / NP18A"
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
20 Index: linux-2.6.24/arch/arm/mach-ixp4xx/Makefile
21 ===================================================================
22 --- linux-2.6.24.orig/arch/arm/mach-ixp4xx/Makefile 2008-03-12 21:21:26.000000000 +1030
23 +++ linux-2.6.24/arch/arm/mach-ixp4xx/Makefile 2008-03-12 21:21:26.000000000 +1030
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
33 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
34 obj-$(CONFIG_MACH_FSG) += fsg-setup.o
35 obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
36 +obj-$(CONFIG_MACH_COMPEX) += compex-setup.o
38 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
39 Index: linux-2.6.24/arch/arm/mach-ixp4xx/compex-setup.c
40 ===================================================================
41 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
42 +++ linux-2.6.24/arch/arm/mach-ixp4xx/compex-setup.c 2008-03-12 21:21:26.000000000 +1030
45 + * arch/arm/mach-ixp4xx/compex-setup.c
47 + * Ccompex WP18 / NP18A board-setup
49 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
51 + * based on ixdp425-setup.c:
52 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
54 + * Author: Imre Kaloz <Kaloz@openwrt.org>
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>
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>
71 +#include <asm/mach/arch.h>
72 +#include <asm/mach/flash.h>
74 +static struct flash_platform_data compex_flash_data = {
75 + .map_name = "cfi_probe",
79 +static struct resource compex_flash_resource = {
80 + .flags = IORESOURCE_MEM,
83 +static struct platform_device compex_flash = {
84 + .name = "IXP4XX-Flash",
87 + .platform_data = &compex_flash_data,
90 + .resource = &compex_flash_resource,
93 +static struct resource compex_uart_resources[] = {
95 + .start = IXP4XX_UART1_BASE_PHYS,
96 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
97 + .flags = IORESOURCE_MEM
100 + .start = IXP4XX_UART2_BASE_PHYS,
101 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
102 + .flags = IORESOURCE_MEM
106 +static struct plat_serial8250_port compex_uart_data[] = {
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,
114 + .uartclk = IXP4XX_UART_XTAL,
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,
123 + .uartclk = IXP4XX_UART_XTAL,
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,
136 +static struct platform_device *compex_devices[] __initdata = {
141 +static void __init compex_init(void)
145 + compex_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
146 + compex_flash_resource.end =
147 + IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
149 + platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices));
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,
164 Index: linux-2.6.24/arch/arm/mach-ixp4xx/ixdp425-pci.c
165 ===================================================================
166 --- linux-2.6.24.orig/arch/arm/mach-ixp4xx/ixdp425-pci.c 2008-03-12 21:20:48.000000000 +1030
167 +++ linux-2.6.24/arch/arm/mach-ixp4xx/ixdp425-pci.c 2008-03-12 21:21:26.000000000 +1030
169 int __init ixdp425_pci_init(void)
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);
177 Index: linux-2.6.24/arch/arm/tools/mach-types
178 ===================================================================
179 --- linux-2.6.24.orig/arch/arm/tools/mach-types 2008-03-12 21:20:48.000000000 +1030
180 +++ linux-2.6.24/arch/arm/tools/mach-types 2008-03-12 21:21:26.000000000 +1030
181 @@ -1278,7 +1278,7 @@
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