1 --- a/arch/arm/mach-ixp4xx/Kconfig
2 +++ b/arch/arm/mach-ixp4xx/Kconfig
4 Engineering Sidewinder board. For more information on this
5 platform, see http://www.adiengineering.com
8 + bool "Compex WP18 / NP18A"
11 + Say 'Y' here if you want your kernel to support Compex'
12 + WP18 or NP18A boards. For more information on this
13 + platform, see http://openwrt.org
18 --- a/arch/arm/mach-ixp4xx/Makefile
19 +++ b/arch/arm/mach-ixp4xx/Makefile
21 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
22 obj-pci-$(CONFIG_MACH_PRONGHORN) += pronghorn-pci.o
23 obj-pci-$(CONFIG_MACH_SIDEWINDER) += sidewinder-pci.o
24 +obj-pci-$(CONFIG_MACH_COMPEX) += ixdp425-pci.o
29 obj-$(CONFIG_MACH_FSG) += fsg-setup.o
30 obj-$(CONFIG_MACH_PRONGHORN) += pronghorn-setup.o
31 obj-$(CONFIG_MACH_SIDEWINDER) += sidewinder-setup.o
32 +obj-$(CONFIG_MACH_COMPEX) += compex-setup.o
34 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
35 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
37 +++ b/arch/arm/mach-ixp4xx/compex-setup.c
40 + * arch/arm/mach-ixp4xx/compex-setup.c
42 + * Ccompex WP18 / NP18A board-setup
44 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
46 + * based on ixdp425-setup.c:
47 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
49 + * Author: Imre Kaloz <Kaloz@openwrt.org>
52 +#include <linux/kernel.h>
53 +#include <linux/init.h>
54 +#include <linux/device.h>
55 +#include <linux/serial.h>
56 +#include <linux/tty.h>
57 +#include <linux/serial_8250.h>
58 +#include <linux/slab.h>
60 +#include <asm/types.h>
61 +#include <asm/setup.h>
62 +#include <asm/memory.h>
63 +#include <asm/hardware.h>
64 +#include <asm/mach-types.h>
66 +#include <asm/mach/arch.h>
67 +#include <asm/mach/flash.h>
69 +static struct flash_platform_data compex_flash_data = {
70 + .map_name = "cfi_probe",
74 +static struct resource compex_flash_resource = {
75 + .flags = IORESOURCE_MEM,
78 +static struct platform_device compex_flash = {
79 + .name = "IXP4XX-Flash",
82 + .platform_data = &compex_flash_data,
85 + .resource = &compex_flash_resource,
88 +static struct resource compex_uart_resources[] = {
90 + .start = IXP4XX_UART1_BASE_PHYS,
91 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
92 + .flags = IORESOURCE_MEM
95 + .start = IXP4XX_UART2_BASE_PHYS,
96 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
97 + .flags = IORESOURCE_MEM
101 +static struct plat_serial8250_port compex_uart_data[] = {
103 + .mapbase = IXP4XX_UART1_BASE_PHYS,
104 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
105 + .irq = IRQ_IXP4XX_UART1,
106 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
107 + .iotype = UPIO_MEM,
109 + .uartclk = IXP4XX_UART_XTAL,
112 + .mapbase = IXP4XX_UART2_BASE_PHYS,
113 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
114 + .irq = IRQ_IXP4XX_UART2,
115 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
116 + .iotype = UPIO_MEM,
118 + .uartclk = IXP4XX_UART_XTAL,
123 +static struct platform_device compex_uart = {
124 + .name = "serial8250",
125 + .id = PLAT8250_DEV_PLATFORM,
126 + .dev.platform_data = compex_uart_data,
127 + .num_resources = 2,
128 + .resource = compex_uart_resources,
131 +static struct platform_device *compex_devices[] __initdata = {
136 +static void __init compex_init(void)
140 + compex_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
141 + compex_flash_resource.end =
142 + IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
144 + platform_add_devices(compex_devices, ARRAY_SIZE(compex_devices));
147 +#ifdef CONFIG_MACH_COMPEX
148 +MACHINE_START(COMPEX, "Compex WP18 / NP18A")
149 + /* Maintainer: Imre Kaloz <Kaloz@openwrt.org> */
150 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
151 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
152 + .map_io = ixp4xx_map_io,
153 + .init_irq = ixp4xx_init_irq,
154 + .timer = &ixp4xx_timer,
155 + .boot_params = 0x0100,
156 + .init_machine = compex_init,
159 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
160 +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
162 int __init ixdp425_pci_init(void)
164 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
165 - machine_is_ixdp465() || machine_is_kixrp435())
166 + machine_is_ixdp465() || machine_is_kixrp435() || machine_is_compex())
167 pci_common_init(&ixdp425_pci);
170 --- a/arch/arm/tools/mach-types
171 +++ b/arch/arm/tools/mach-types
172 @@ -1276,7 +1276,7 @@
173 smdk6400 MACH_SMDK6400 SMDK6400 1270
174 nokia_n800 MACH_NOKIA_N800 NOKIA_N800 1271
175 greenphone MACH_GREENPHONE GREENPHONE 1272
176 -compex42x MACH_COMPEXWP18 COMPEXWP18 1273
177 +compex MACH_COMPEX COMPEX 1273
178 xmate MACH_XMATE XMATE 1274
179 energizer MACH_ENERGIZER ENERGIZER 1275
180 ime1 MACH_IME1 IME1 1276