1 diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig
2 --- linux-2.6.16.4/arch/arm/mach-ixp4xx/Kconfig 2006-04-11 19:19:28.000000000 +0200
3 +++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-04-12 16:47:34.000000000 +0200
5 Engineering Coyote Gateway Reference Platform. For more
6 information on this platform, see <file:Documentation/arm/IXP4xx>.
8 +config MACH_GATEWAY7001
11 + Say 'Y' here if you want your kernel to support Gateway's
12 + 7001 Access Point. For more information on this platform,
13 + see http://openwrt.org
18 diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile
19 --- linux-2.6.16.4/arch/arm/mach-ixp4xx/Makefile 2006-04-11 19:19:28.000000000 +0200
20 +++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/Makefile 2006-04-12 22:34:09.000000000 +0200
22 obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o
23 obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o
24 obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o
25 +obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o gateway7001-setup.o
27 diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c
28 --- linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100
29 +++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-04-12 22:35:29.000000000 +0200
32 + * arch/arm/mach-ixp4xx/gateway7001-pci.c
34 + * Gateway 7001 board-level PCI initialization
36 + * Copyright (c) 2006 Imre Kaloz <kaloz@openwrt.org>
38 + * based on ixdp425-pci.c:
39 + * Copyright (C) 2002 Intel Corporation.
40 + * Copyright (C) 2003-2004 MontaVista Software, Inc.
42 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
44 + * This program is free software; you can redistribute it and/or modify
45 + * it under the terms of the GNU General Public License version 2 as
46 + * published by the Free Software Foundation.
50 +#include <linux/kernel.h>
51 +#include <linux/config.h>
52 +#include <linux/pci.h>
53 +#include <linux/init.h>
54 +#include <linux/delay.h>
56 +#include <asm/mach/pci.h>
58 +#include <asm/hardware.h>
59 +#include <asm/mach-types.h>
61 +void __init gateway7001_pci_preinit(void)
63 + set_irq_type(IRQ_GATEWAY7001_PCI_INTA, IRQT_LOW);
64 + set_irq_type(IRQ_GATEWAY7001_PCI_INTB, IRQT_LOW);
65 + set_irq_type(IRQ_GATEWAY7001_PCI_INTC, IRQT_LOW);
66 + set_irq_type(IRQ_GATEWAY7001_PCI_INTD, IRQT_LOW);
68 + ixp4xx_pci_preinit();
71 +static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
73 + static int pci_irq_table[GATEWAY7001_PCI_IRQ_LINES] = {
74 + IRQ_GATEWAY7001_PCI_INTA,
75 + IRQ_GATEWAY7001_PCI_INTB,
76 + IRQ_GATEWAY7001_PCI_INTC,
77 + IRQ_GATEWAY7001_PCI_INTD
82 + if (slot >= 1 && slot <= GATEWAY7001_PCI_MAX_DEV &&
83 + pin >= 1 && pin <= GATEWAY7001_PCI_IRQ_LINES) {
84 + irq = pci_irq_table[(slot + pin - 2) % 4];
90 +struct hw_pci gateway7001_pci __initdata = {
91 + .nr_controllers = 1,
92 + .preinit = gateway7001_pci_preinit,
93 + .swizzle = pci_std_swizzle,
94 + .setup = ixp4xx_setup,
95 + .scan = ixp4xx_scan_bus,
96 + .map_irq = gateway7001_map_irq,
99 +int __init gateway7001_pci_init(void)
101 + if (machine_is_gateway7001())
102 + pci_common_init(&gateway7001_pci);
106 +subsys_initcall(gateway7001_pci_init);
108 diff -Nur linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-setup.c linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-setup.c
109 --- linux-2.6.16.4/arch/arm/mach-ixp4xx/gateway7001-setup.c 1970-01-01 01:00:00.000000000 +0100
110 +++ linux-2.6.16.4-owrt/arch/arm/mach-ixp4xx/gateway7001-setup.c 2006-04-12 22:45:53.000000000 +0200
113 + * arch/arm/mach-ixp4xx/gateway7001-setup.c
115 + * Gateway 7001 board-setup
117 + * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
119 + * based-on ixdp425-setup.c:
120 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
122 + * Author: Imre Kaloz <kaloz@openwrt.org>
125 +#include <linux/kernel.h>
126 +#include <linux/init.h>
127 +#include <linux/device.h>
128 +#include <linux/serial.h>
129 +#include <linux/tty.h>
130 +#include <linux/serial_8250.h>
131 +#include <linux/slab.h>
133 +#include <asm/types.h>
134 +#include <asm/setup.h>
135 +#include <asm/memory.h>
136 +#include <asm/hardware.h>
137 +#include <asm/mach-types.h>
138 +#include <asm/irq.h>
139 +#include <asm/mach/arch.h>
140 +#include <asm/mach/flash.h>
142 +static struct flash_platform_data gateway7001_flash_data = {
143 + .map_name = "cfi_probe",
147 +static struct resource gateway7001_flash_resource = {
148 + .flags = IORESOURCE_MEM,
151 +static struct platform_device gateway7001_flash = {
152 + .name = "IXP4XX-Flash",
155 + .platform_data = &gateway7001_flash_data,
157 + .num_resources = 1,
158 + .resource = &gateway7001_flash_resource,
161 +static struct ixp4xx_i2c_pins gateway7001_i2c_gpio_pins = {
162 + .sda_pin = GATEWAY7001_SDA_PIN,
163 + .scl_pin = GATEWAY7001_SCL_PIN,
166 +static struct platform_device gateway7001_i2c_controller = {
167 + .name = "IXP4XX-I2C",
170 + .platform_data = &gateway7001_i2c_gpio_pins,
175 +static struct resource gateway7001_uart_resources[] = {
177 + .start = IXP4XX_UART1_BASE_PHYS,
178 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
179 + .flags = IORESOURCE_MEM
182 + .start = IXP4XX_UART2_BASE_PHYS,
183 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
184 + .flags = IORESOURCE_MEM
188 +static struct plat_serial8250_port gateway7001_uart_data[] = {
190 + .mapbase = IXP4XX_UART1_BASE_PHYS,
191 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
192 + .irq = IRQ_IXP4XX_UART1,
193 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
194 + .iotype = UPIO_MEM,
196 + .uartclk = IXP4XX_UART_XTAL,
199 + .mapbase = IXP4XX_UART2_BASE_PHYS,
200 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
201 + .irq = IRQ_IXP4XX_UART2,
202 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
203 + .iotype = UPIO_MEM,
205 + .uartclk = IXP4XX_UART_XTAL,
210 +static struct platform_device gateway7001_uart = {
211 + .name = "serial8250",
212 + .id = PLAT8250_DEV_PLATFORM,
213 + .dev.platform_data = gateway7001_uart_data,
214 + .num_resources = 2,
215 + .resource = gateway7001_uart_resources
218 +static struct platform_device *gateway7001_devices[] __initdata = {
219 + &gateway7001_i2c_controller,
220 + &gateway7001_flash,
224 +static void __init gateway7001_init(void)
228 + gateway7001_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
229 + gateway7001_flash_resource.end =
230 + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
232 + platform_add_devices(gateway7001_devices, ARRAY_SIZE(gateway7001_devices));
235 +#ifdef CONFIG_MACH_GATEWAY7001
236 +MACHINE_START(GATEWAY7001, "Gateway 7001")
237 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
238 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
239 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
240 + .map_io = ixp4xx_map_io,
241 + .init_irq = ixp4xx_init_irq,
242 + .timer = &ixp4xx_timer,
243 + .boot_params = 0x0100,
244 + .init_machine = gateway7001_init,
248 diff -Nur linux-2.6.16.4/include/asm-arm/arch-ixp4xx/gateway7001.h linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/gateway7001.h
249 --- linux-2.6.16.4/include/asm-arm/arch-ixp4xx/gateway7001.h 1970-01-01 01:00:00.000000000 +0100
250 +++ linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/gateway7001.h 2006-04-12 22:34:43.000000000 +0200
253 + * include/asm-arm/arch-ixp4xx/gateway7001.h
255 + * Gateway 7001 platform specific definitions
257 + * Author: Imre Kaloz <kaloz@openwrt.org>
259 + * Copyright 2006 (c) Imre Kaloz <kaloz@openwrt.org>
261 + * based on ixdp425.h:
262 + * Copyright 2004 (c) MontaVista, Software, Inc.
264 + * This file is licensed under the terms of the GNU General Public
265 + * License version 2. This program is licensed "as is" without any
266 + * warranty of any kind, whether express or implied.
269 +#ifndef __ASM_ARCH_HARDWARE_H__
270 +#error "Do not include this directly, instead #include <asm/hardware.h>"
273 +#define GATEWAY7001_SDA_PIN 7
274 +#define GATEWAY7001_SCL_PIN 6
277 + * GATEWAY7001 PCI IRQs
279 +#define GATEWAY7001_PCI_MAX_DEV 4
280 +#define GATEWAY7001_PCI_IRQ_LINES 4
283 +/* PCI controller GPIO to IRQ pin mappings */
284 +#define GATEWAY7001_PCI_INTA_PIN 11
285 +#define GATEWAY7001_PCI_INTB_PIN 10
286 +#define GATEWAY7001_PCI_INTC_PIN 9
287 +#define GATEWAY7001_PCI_INTD_PIN 8
288 diff -Nur linux-2.6.16.4/include/asm-arm/arch-ixp4xx/hardware.h linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/hardware.h
289 --- linux-2.6.16.4/include/asm-arm/arch-ixp4xx/hardware.h 2006-04-11 19:19:28.000000000 +0200
290 +++ linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/hardware.h 2006-04-12 22:34:52.000000000 +0200
292 #include "prpmc1100.h"
295 +#include "gateway7001.h"
297 #endif /* _ASM_ARCH_HARDWARE_H */
298 diff -Nur linux-2.6.16.4/include/asm-arm/arch-ixp4xx/irqs.h linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/irqs.h
299 --- linux-2.6.16.4/include/asm-arm/arch-ixp4xx/irqs.h 2006-04-11 19:19:28.000000000 +0200
300 +++ linux-2.6.16.4-owrt/include/asm-arm/arch-ixp4xx/irqs.h 2006-04-12 22:35:05.000000000 +0200
302 #define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8
303 #define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7
306 + * GATEWAY7001 board IRQs
308 +#define IRQ_GATEWAY7001_PCI_INTA IRQ_IXP4XX_GPIO11
309 +#define IRQ_GATEWAY7001_PCI_INTB IRQ_IXP4XX_GPIO10
310 +#define IRQ_GATEWAY7001_PCI_INTC IRQ_IXP4XX_GPIO9
311 +#define IRQ_GATEWAY7001_PCI_INTD IRQ_IXP4XX_GPIO8