1 Index: linux-2.6.21.7/arch/arm/boot/compressed/head-xscale.S
2 ===================================================================
3 --- linux-2.6.21.7.orig/arch/arm/boot/compressed/head-xscale.S
4 +++ linux-2.6.21.7/arch/arm/boot/compressed/head-xscale.S
5 @@ -46,6 +46,11 @@ __XScale_start:
6 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
9 +#ifdef CONFIG_MACH_GATEWAY7001
10 + mov r7, #(MACH_TYPE_GATEWAY7001 & 0xff)
11 + orr r7, r7, #(MACH_TYPE_GATEWAY7001 & 0xff00)
14 #ifdef CONFIG_ARCH_IXP2000
17 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/gateway7001-pci.c
18 ===================================================================
20 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/gateway7001-pci.c
23 + * arch/arch/mach-ixp4xx/gateway7001-pci.c
25 + * PCI setup routines for Gateway 7001
27 + * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
29 + * based on coyote-pci.c:
30 + * Copyright (C) 2002 Jungo Software Technologies.
31 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
33 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
35 + * This program is free software; you can redistribute it and/or modify
36 + * it under the terms of the GNU General Public License version 2 as
37 + * published by the Free Software Foundation.
41 +#include <linux/kernel.h>
42 +#include <linux/pci.h>
43 +#include <linux/init.h>
44 +#include <linux/irq.h>
46 +#include <asm/mach-types.h>
47 +#include <asm/hardware.h>
50 +#include <asm/mach/pci.h>
52 +extern void ixp4xx_pci_preinit(void);
53 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
54 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
56 +void __init gateway7001_pci_preinit(void)
58 + set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
59 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
61 + ixp4xx_pci_preinit();
64 +static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
67 + return IRQ_IXP4XX_GPIO11;
69 + return IRQ_IXP4XX_GPIO10;
73 +struct hw_pci gateway7001_pci __initdata = {
74 + .nr_controllers = 1,
75 + .preinit = gateway7001_pci_preinit,
76 + .swizzle = pci_std_swizzle,
77 + .setup = ixp4xx_setup,
78 + .scan = ixp4xx_scan_bus,
79 + .map_irq = gateway7001_map_irq,
82 +int __init gateway7001_pci_init(void)
84 + if (machine_is_gateway7001())
85 + pci_common_init(&gateway7001_pci);
89 +subsys_initcall(gateway7001_pci_init);
90 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/gateway7001-setup.c
91 ===================================================================
93 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/gateway7001-setup.c
96 + * arch/arm/mach-ixp4xx/gateway7001-setup.c
98 + * Board setup for the Gateway 7001 board
100 + * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org>
102 + * based on coyote-setup.c:
103 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
105 + * Author: Imre Kaloz <Kaloz@openwrt.org>
108 +#include <linux/kernel.h>
109 +#include <linux/init.h>
110 +#include <linux/device.h>
111 +#include <linux/serial.h>
112 +#include <linux/tty.h>
113 +#include <linux/serial_8250.h>
114 +#include <linux/slab.h>
116 +#include <asm/types.h>
117 +#include <asm/setup.h>
118 +#include <asm/memory.h>
119 +#include <asm/hardware.h>
120 +#include <asm/irq.h>
121 +#include <asm/mach-types.h>
122 +#include <asm/mach/arch.h>
123 +#include <asm/mach/flash.h>
125 +static struct flash_platform_data gateway7001_flash_data = {
126 + .map_name = "cfi_probe",
130 +static struct resource gateway7001_flash_resource = {
131 + .flags = IORESOURCE_MEM,
134 +static struct platform_device gateway7001_flash = {
135 + .name = "IXP4XX-Flash",
138 + .platform_data = &gateway7001_flash_data,
140 + .num_resources = 1,
141 + .resource = &gateway7001_flash_resource,
144 +static struct resource gateway7001_uart_resource = {
145 + .start = IXP4XX_UART2_BASE_PHYS,
146 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
147 + .flags = IORESOURCE_MEM,
150 +static struct plat_serial8250_port gateway7001_uart_data[] = {
152 + .mapbase = IXP4XX_UART2_BASE_PHYS,
153 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
154 + .irq = IRQ_IXP4XX_UART2,
155 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
156 + .iotype = UPIO_MEM,
158 + .uartclk = IXP4XX_UART_XTAL,
163 +static struct platform_device gateway7001_uart = {
164 + .name = "serial8250",
165 + .id = PLAT8250_DEV_PLATFORM,
167 + .platform_data = gateway7001_uart_data,
169 + .num_resources = 1,
170 + .resource = &gateway7001_uart_resource,
173 +static struct platform_device *gateway7001_devices[] __initdata = {
174 + &gateway7001_flash,
178 +static void __init gateway7001_init(void)
182 + gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
183 + gateway7001_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
185 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
186 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
188 + platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));
191 +#ifdef CONFIG_MACH_GATEWAY7001
192 +MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
193 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
194 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
195 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
196 + .map_io = ixp4xx_map_io,
197 + .init_irq = ixp4xx_init_irq,
198 + .timer = &ixp4xx_timer,
199 + .boot_params = 0x0100,
200 + .init_machine = gateway7001_init,
203 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
204 ===================================================================
205 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Kconfig
206 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
207 @@ -41,6 +41,14 @@ config ARCH_ADI_COYOTE
208 Engineering Coyote Gateway Reference Platform. For more
209 information on this platform, see <file:Documentation/arm/IXP4xx>.
211 +config MACH_GATEWAY7001
212 + bool "Gateway 7001"
215 + Say 'Y' here if you want your kernel to support Gateway's
216 + 7001 Access Point. For more information on this platform,
217 + see http://openwrt.org
222 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
223 ===================================================================
224 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Makefile
225 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
226 @@ -13,6 +13,7 @@ obj-pci-$(CONFIG_MACH_GTWX5715) += gtwx
227 obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o
228 obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
229 obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
230 +obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
234 @@ -24,5 +25,6 @@ obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-
235 obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
236 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
237 obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
238 +obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
240 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
241 Index: linux-2.6.21.7/include/asm-arm/arch-ixp4xx/uncompress.h
242 ===================================================================
243 --- linux-2.6.21.7.orig/include/asm-arm/arch-ixp4xx/uncompress.h
244 +++ linux-2.6.21.7/include/asm-arm/arch-ixp4xx/uncompress.h
245 @@ -38,9 +38,9 @@ static void flush(void)
246 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
249 - * Coyote and gtwx5715 only have UART2 connected
250 + * Some boards are using UART2 as console
252 - if (machine_is_adi_coyote() || machine_is_gtwx5715())
253 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001())
254 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
256 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;