1 Index: linux-2.6.27.3/arch/arm/mach-ixp4xx/Kconfig
2 ===================================================================
3 --- linux-2.6.27.3.orig/arch/arm/mach-ixp4xx/Kconfig 2008-11-05 19:31:20.000000000 +0000
4 +++ linux-2.6.27.3/arch/arm/mach-ixp4xx/Kconfig 2008-11-05 20:10:26.000000000 +0000
5 @@ -97,6 +97,14 @@ config MACH_SIDEWINDER
6 Engineering Sidewinder board. For more information on this
7 platform, see http://www.adiengineering.com
10 + bool "USRobotics USR8200"
13 + Say 'Y' here if you want your kernel to support the USRobotics
14 + USR8200 router board. For more information on this platform, see
18 bool "Compex WP18 / NP18A"
20 Index: linux-2.6.27.3/arch/arm/mach-ixp4xx/Makefile
21 ===================================================================
22 --- linux-2.6.27.3.orig/arch/arm/mach-ixp4xx/Makefile 2008-11-05 19:31:20.000000000 +0000
23 +++ linux-2.6.27.3/arch/arm/mach-ixp4xx/Makefile 2008-11-05 20:10:26.000000000 +0000
24 @@ -24,6 +24,7 @@ obj-pci-$(CONFIG_MACH_COMPEX) += ixdp42
25 obj-pci-$(CONFIG_MACH_WRT300NV2) += wrt300nv2-pci.o
26 obj-pci-$(CONFIG_MACH_AP1000) += ixdp425-pci.o
27 obj-pci-$(CONFIG_MACH_TW5334) += tw5334-pci.o
28 +obj-pci-$(CONFIG_MACH_USR8200) += usr8200-pci.o
32 @@ -46,6 +47,7 @@ obj-$(CONFIG_MACH_COMPEX) += compex-setu
33 obj-$(CONFIG_MACH_WRT300NV2) += wrt300nv2-setup.o
34 obj-$(CONFIG_MACH_AP1000) += ap1000-setup.o
35 obj-$(CONFIG_MACH_TW5334) += tw5334-setup.o
36 +obj-$(CONFIG_MACH_USR8200) += usr8200-setup.o
38 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
39 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
40 Index: linux-2.6.27.3/arch/arm/mach-ixp4xx/usr8200-pci.c
41 ===================================================================
42 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
43 +++ linux-2.6.27.3/arch/arm/mach-ixp4xx/usr8200-pci.c 2008-11-05 22:51:20.000000000 +0000
46 + * arch/arch/mach-ixp4xx/usr8200-pci.c
48 + * PCI setup routines for USRobotics USR8200
50 + * Copyright (C) 2008 Peter Denison <openwrt@marshadder.org>
52 + * based on pronghorn-pci.c
53 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
54 + * based on coyote-pci.c:
55 + * Copyright (C) 2002 Jungo Software Technologies.
56 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
58 + * Maintainer: Peter Denison <openwrt@marshadder.org>
60 + * This program is free software; you can redistribute it and/or modify
61 + * it under the terms of the GNU General Public License version 2 as
62 + * published by the Free Software Foundation.
66 +#include <linux/kernel.h>
67 +#include <linux/pci.h>
68 +#include <linux/init.h>
69 +#include <linux/irq.h>
71 +#include <asm/mach-types.h>
72 +#include <mach/hardware.h>
74 +#include <asm/mach/pci.h>
76 +void __init usr8200_pci_preinit(void)
78 + set_irq_type(IRQ_IXP4XX_GPIO7, IRQ_TYPE_LEVEL_LOW);
79 + set_irq_type(IRQ_IXP4XX_GPIO8, IRQ_TYPE_LEVEL_LOW);
80 + set_irq_type(IRQ_IXP4XX_GPIO9, IRQ_TYPE_LEVEL_LOW);
81 + set_irq_type(IRQ_IXP4XX_GPIO10, IRQ_TYPE_LEVEL_LOW);
82 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQ_TYPE_LEVEL_LOW);
84 + ixp4xx_pci_preinit();
87 +static int __init usr8200_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
90 + return IRQ_IXP4XX_GPIO7;
91 + else if (slot == 15)
92 + return IRQ_IXP4XX_GPIO8;
93 + else if (slot == 16) {
95 + return IRQ_IXP4XX_GPIO11;
97 + return IRQ_IXP4XX_GPIO10;
99 + return IRQ_IXP4XX_GPIO9;
106 +struct hw_pci usr8200_pci __initdata = {
107 + .nr_controllers = 1,
108 + .preinit = usr8200_pci_preinit,
109 + .swizzle = pci_std_swizzle,
110 + .setup = ixp4xx_setup,
111 + .scan = ixp4xx_scan_bus,
112 + .map_irq = usr8200_map_irq,
115 +int __init usr8200_pci_init(void)
117 + if (machine_is_usr8200())
118 + pci_common_init(&usr8200_pci);
122 +subsys_initcall(usr8200_pci_init);
123 Index: linux-2.6.27.3/arch/arm/mach-ixp4xx/usr8200-setup.c
124 ===================================================================
125 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
126 +++ linux-2.6.27.3/arch/arm/mach-ixp4xx/usr8200-setup.c 2008-11-05 20:23:32.000000000 +0000
129 + * arch/arm/mach-ixp4xx/usr8200-setup.c
131 + * Board setup for the USRobotics USR8200
133 + * Copyright (C) 2008 Peter Denison <openwrt@marshadder.org>
135 + * based on pronghorn-setup.c:
136 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
137 + * based on coyote-setup.c:
138 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
140 + * Author: Peter Denison <openwrt@marshadder.org>
143 +#include <linux/kernel.h>
144 +#include <linux/init.h>
145 +#include <linux/device.h>
146 +#include <linux/serial.h>
147 +#include <linux/tty.h>
148 +#include <linux/serial_8250.h>
149 +#include <linux/slab.h>
150 +#include <linux/types.h>
151 +#include <linux/memory.h>
152 +#include <linux/i2c-gpio.h>
153 +#include <linux/leds.h>
155 +#include <asm/setup.h>
156 +#include <mach/hardware.h>
157 +#include <asm/irq.h>
158 +#include <asm/mach-types.h>
159 +#include <asm/mach/arch.h>
160 +#include <asm/mach/flash.h>
162 +static struct flash_platform_data usr8200_flash_data = {
163 + .map_name = "cfi_probe",
167 +static struct resource usr8200_flash_resource = {
168 + .flags = IORESOURCE_MEM,
171 +static struct platform_device usr8200_flash = {
172 + .name = "IXP4XX-Flash",
175 + .platform_data = &usr8200_flash_data,
177 + .num_resources = 1,
178 + .resource = &usr8200_flash_resource,
181 +static struct resource usr8200_uart_resources [] = {
183 + .start = IXP4XX_UART2_BASE_PHYS,
184 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
185 + .flags = IORESOURCE_MEM
188 + .start = IXP4XX_UART1_BASE_PHYS,
189 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
190 + .flags = IORESOURCE_MEM
194 +static struct plat_serial8250_port usr8200_uart_data[] = {
196 + .mapbase = IXP4XX_UART2_BASE_PHYS,
197 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
198 + .irq = IRQ_IXP4XX_UART2,
199 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
200 + .iotype = UPIO_MEM,
202 + .uartclk = IXP4XX_UART_XTAL,
205 + .mapbase = IXP4XX_UART1_BASE_PHYS,
206 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
207 + .irq = IRQ_IXP4XX_UART1,
208 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
209 + .iotype = UPIO_MEM,
211 + .uartclk = IXP4XX_UART_XTAL,
216 +static struct platform_device usr8200_uart = {
217 + .name = "serial8250",
218 + .id = PLAT8250_DEV_PLATFORM,
220 + .platform_data = usr8200_uart_data,
222 + .num_resources = 2,
223 + .resource = usr8200_uart_resources,
227 +static struct i2c_gpio_platform_data usr8200_i2c_gpio_data = {
232 +static struct platform_device usr8200_i2c_gpio = {
233 + .name = "i2c-gpio",
236 + .platform_data = &usr8200_i2c_gpio_data,
240 +static struct gpio_led usr8200_led_pin[] = {
242 + .name = "usr8200:green:status",
247 +static struct gpio_led_platform_data usr8200_led_data = {
249 + .leds = usr8200_led_pin,
252 +static struct platform_device usr8200_led = {
253 + .name = "leds-gpio",
255 + .dev.platform_data = &usr8200_led_data,
259 +static struct eth_plat_info usr8200_plat_eth[] = {
271 +static struct platform_device usr8200_eth[] = {
273 + .name = "ixp4xx_eth",
274 + .id = IXP4XX_ETH_NPEC,
275 + .dev.platform_data = usr8200_plat_eth,
277 + .name = "ixp4xx_eth",
278 + .id = IXP4XX_ETH_NPEB,
279 + .dev.platform_data = usr8200_plat_eth + 1,
283 +static struct platform_device *usr8200_devices[] __initdata = {
287 + &usr8200_i2c_gpio, */
292 +static void __init usr8200_init(void)
296 + usr8200_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
297 + usr8200_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_64M - 1;
299 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
300 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
302 + platform_add_devices(usr8200_devices, ARRAY_SIZE(usr8200_devices));
305 +MACHINE_START(USR8200, "USRobotics USR8200")
306 + /* Maintainer: Peter Denison <openwrt@marshadder.org> */
307 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
308 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
309 + .map_io = ixp4xx_map_io,
310 + .init_irq = ixp4xx_init_irq,
311 + .timer = &ixp4xx_timer,
312 + .boot_params = 0x0100,
313 + .init_machine = usr8200_init,
315 Index: linux-2.6.27.3/arch/arm/mach-ixp4xx/include/mach/uncompress.h
316 ===================================================================
317 --- linux-2.6.27.3.orig/arch/arm/mach-ixp4xx/include/mach/uncompress.h 2008-11-05 20:11:38.000000000 +0000
318 +++ linux-2.6.27.3/arch/arm/mach-ixp4xx/include/mach/uncompress.h 2008-11-05 20:12:11.000000000 +0000
319 @@ -43,7 +43,7 @@ static __inline__ void __arch_decomp_set
320 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
321 machine_is_gateway7001() || machine_is_wg302v2() ||
322 machine_is_pronghorn() || machine_is_pronghorn_metro() || machine_is_wrt300nv2() ||
323 - machine_is_tw5334())
324 + machine_is_tw5334() || machine_is_usr8200())
325 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
327 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;