1 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig
2 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/Kconfig 2007-04-02 16:09:06.000000000 +0200
3 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-04-02 16:01:25.000000000 +0200
5 7001 Access Point. For more information on this platform,
9 + bool "Netgear WG302 v2 / WAG302 v2"
12 + Say 'Y' here if you want your kernel to support Netgear's
13 + WG302 v2 or WAG302 v2 Access Points. For more information
14 + on this platform, see http://openwrt.org
19 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile
20 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/Makefile 2007-04-02 16:09:06.000000000 +0200
21 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/Makefile 2007-04-02 16:09:25.000000000 +0200
23 obj-pci-$(CONFIG_MACH_NSLU2) += nslu2-pci.o
24 obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
25 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
26 +obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
31 obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
32 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
33 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
34 +obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
36 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
37 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/wg302v2-pci.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/wg302v2-pci.c
38 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/wg302v2-pci.c 1970-01-01 01:00:00.000000000 +0100
39 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/wg302v2-pci.c 2007-04-02 16:00:12.000000000 +0200
42 + * arch/arch/mach-ixp4xx/wg302v2-pci.c
44 + * PCI setup routines for the Netgear WG302 v2 and WAG302 v2
46 + * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
48 + * based on coyote-pci.c:
49 + * Copyright (C) 2002 Jungo Software Technologies.
50 + * Copyright (C) 2003 MontaVista Software, Inc.
52 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
54 + * This program is free software; you can redistribute it and/or modify
55 + * it under the terms of the GNU General Public License version 2 as
56 + * published by the Free Software Foundation.
60 +#include <linux/kernel.h>
61 +#include <linux/pci.h>
62 +#include <linux/init.h>
63 +#include <linux/irq.h>
65 +#include <asm/mach-types.h>
66 +#include <asm/hardware.h>
69 +#include <asm/mach/pci.h>
71 +extern void ixp4xx_pci_preinit(void);
72 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
73 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
75 +void __init wg302v2_pci_preinit(void)
77 + set_irq_type(IRQ_IXP4XX_GPIO8, IRQT_LOW);
78 + set_irq_type(IRQ_IXP4XX_GPIO9, IRQT_LOW);
80 + ixp4xx_pci_preinit();
83 +static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
86 + return IRQ_IXP4XX_GPIO8;
88 + return IRQ_IXP4XX_GPIO9;
92 +struct hw_pci wg302v2_pci __initdata = {
93 + .nr_controllers = 1,
94 + .preinit = wg302v2_pci_preinit,
95 + .swizzle = pci_std_swizzle,
96 + .setup = ixp4xx_setup,
97 + .scan = ixp4xx_scan_bus,
98 + .map_irq = wg302v2_map_irq,
101 +int __init wg302v2_pci_init(void)
103 + if (machine_is_wg302v2())
104 + pci_common_init(&wg302v2_pci);
108 +subsys_initcall(wg302v2_pci_init);
109 diff -Nur linux-2.6.19.2/arch/arm/mach-ixp4xx/wg302v2-setup.c linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/wg302v2-setup.c
110 --- linux-2.6.19.2/arch/arm/mach-ixp4xx/wg302v2-setup.c 1970-01-01 01:00:00.000000000 +0100
111 +++ linux-2.6.19.2-owrt/arch/arm/mach-ixp4xx/wg302v2-setup.c 2007-04-02 16:08:57.000000000 +0200
114 + * arch/arm/mach-ixp4xx/wg302-setup.c
116 + * Board setup for the Netgear WG302 v2 and WAG302 v2
118 + * based on coyote-setup.c:
119 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
121 + * Maintainer: 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/irq.h>
138 +#include <asm/mach-types.h>
139 +#include <asm/mach/arch.h>
140 +#include <asm/mach/flash.h>
142 +static struct flash_platform_data wg302v2_flash_data = {
143 + .map_name = "cfi_probe",
147 +static struct resource wg302v2_flash_resource = {
148 + .flags = IORESOURCE_MEM,
151 +static struct platform_device wg302v2_flash = {
152 + .name = "IXP4XX-Flash",
155 + .platform_data = &wg302v2_flash_data,
157 + .num_resources = 1,
158 + .resource = &wg302v2_flash_resource,
161 +static struct resource wg302v2_uart_resource = {
162 + .start = IXP4XX_UART2_BASE_PHYS,
163 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
164 + .flags = IORESOURCE_MEM,
167 +static struct plat_serial8250_port wg302v2_uart_data[] = {
169 + .mapbase = IXP4XX_UART2_BASE_PHYS,
170 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
171 + .irq = IRQ_IXP4XX_UART2,
172 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
173 + .iotype = UPIO_MEM,
175 + .uartclk = IXP4XX_UART_XTAL,
180 +static struct platform_device wg302v2_uart = {
181 + .name = "serial8250",
182 + .id = PLAT8250_DEV_PLATFORM,
184 + .platform_data = wg302v2_uart_data,
186 + .num_resources = 1,
187 + .resource = &wg302v2_uart_resource,
190 +static struct platform_device *wg302v2_devices[] __initdata = {
195 +static void __init wg302v2_init(void)
199 + wg302v2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
200 + wg302v2_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
202 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
203 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
205 + platform_add_devices(wg302v2_devices, ARRAY_SIZE(wg302v2_devices));
208 +#ifdef CONFIG_ARCH_WG302V2
209 +MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
210 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
211 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
212 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
213 + .map_io = ixp4xx_map_io,
214 + .init_irq = ixp4xx_init_irq,
215 + .timer = &ixp4xx_timer,
216 + .boot_params = 0x0100,
217 + .init_machine = wg302v2_init,
220 diff -Nur linux-2.6.19.2/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.19.2-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
221 --- linux-2.6.19.2/include/asm-arm/arch-ixp4xx/uncompress.h 2007-04-02 16:09:06.000000000 +0200
222 +++ linux-2.6.19.2-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2007-04-02 16:02:04.000000000 +0200
225 * Some boards are using UART2 as console
227 - if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001())
228 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001() || machine_is_wg302v2())
229 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
231 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;