1 diff -Nur linux-2.6.23.12/arch/arm/mach-ixp4xx/Kconfig linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/Kconfig
2 --- linux-2.6.23.12/arch/arm/mach-ixp4xx/Kconfig 2008-01-14 22:08:42.000000000 +0100
3 +++ linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/Kconfig 2008-01-14 22:12:21.000000000 +0100
5 7001 Access Point. For more information on this platform,
9 + bool "Netgear WG302 v1 / WAG302 v1"
12 + Say 'Y' here if you want your kernel to support Netgear's
13 + WG302 v1 or WAG302 v1 Access Points. For more information
14 + on this platform, see http://openwrt.org
17 bool "Netgear WG302 v2 / WAG302 v2"
19 diff -Nur linux-2.6.23.12/arch/arm/mach-ixp4xx/Makefile linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/Makefile
20 --- linux-2.6.23.12/arch/arm/mach-ixp4xx/Makefile 2008-01-14 22:08:42.000000000 +0100
21 +++ linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/Makefile 2008-01-14 22:11:47.000000000 +0100
23 obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
24 obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
25 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
26 +obj-pci-$(CONFIG_MACH_WG302V1) += wg302v1-pci.o
27 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
28 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
29 obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
31 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
32 obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
33 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
34 +obj-$(CONFIG_MACH_WG302V1) += wg302v1-setup.o
35 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
36 obj-$(CONFIG_MACH_FSG) += fsg-setup.o fsg-power.o
37 obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
38 diff -Nur linux-2.6.23.12/arch/arm/mach-ixp4xx/wg302v1-pci.c linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/wg302v1-pci.c
39 --- linux-2.6.23.12/arch/arm/mach-ixp4xx/wg302v1-pci.c 1970-01-01 01:00:00.000000000 +0100
40 +++ linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/wg302v1-pci.c 2008-01-14 22:33:52.000000000 +0100
43 + * arch/arch/mach-ixp4xx/wg302v1-pci.c
45 + * PCI setup routines for the Netgear WG302 v1 and WAG302 v1
47 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
49 + * based on coyote-pci.c:
50 + * Copyright (C) 2002 Jungo Software Technologies.
51 + * Copyright (C) 2003 MontaVista Software, Inc.
53 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
55 + * This program is free software; you can redistribute it and/or modify
56 + * it under the terms of the GNU General Public License version 2 as
57 + * published by the Free Software Foundation.
61 +#include <linux/kernel.h>
62 +#include <linux/pci.h>
63 +#include <linux/init.h>
64 +#include <linux/irq.h>
66 +#include <asm/mach-types.h>
67 +#include <asm/hardware.h>
69 +#include <asm/mach/pci.h>
71 +void __init wg302v1_pci_preinit(void)
73 + set_irq_type(IRQ_IXP4XX_GPIO8, IRQT_LOW);
74 + set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
76 + ixp4xx_pci_preinit();
79 +static int __init wg302v1_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
82 + return IRQ_IXP4XX_GPIO8;
84 + return IRQ_IXP4XX_GPIO10;
88 +struct hw_pci wg302v1_pci __initdata = {
89 + .nr_controllers = 1,
90 + .preinit = wg302v1_pci_preinit,
91 + .swizzle = pci_std_swizzle,
92 + .setup = ixp4xx_setup,
93 + .scan = ixp4xx_scan_bus,
94 + .map_irq = wg302v1_map_irq,
97 +int __init wg302v1_pci_init(void)
99 + if (machine_is_wg302v1())
100 + pci_common_init(&wg302v1_pci);
104 +subsys_initcall(wg302v1_pci_init);
105 diff -Nur linux-2.6.23.12/arch/arm/mach-ixp4xx/wg302v1-setup.c linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/wg302v1-setup.c
106 --- linux-2.6.23.12/arch/arm/mach-ixp4xx/wg302v1-setup.c 1970-01-01 01:00:00.000000000 +0100
107 +++ linux-2.6.23.12-owrt/arch/arm/mach-ixp4xx/wg302v1-setup.c 2008-01-14 23:04:01.000000000 +0100
110 + * arch/arm/mach-ixp4xx/wg302v1-setup.c
112 + * Board setup for the Netgear WG302 v1 and WAG302 v1
114 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
116 + * based on coyote-setup.c:
117 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
119 + * Author: Imre Kaloz <kaloz@openwrt.org>
123 +#include <linux/kernel.h>
124 +#include <linux/init.h>
125 +#include <linux/device.h>
126 +#include <linux/serial.h>
127 +#include <linux/tty.h>
128 +#include <linux/serial_8250.h>
129 +#include <linux/slab.h>
131 +#include <asm/types.h>
132 +#include <asm/setup.h>
133 +#include <asm/memory.h>
134 +#include <asm/hardware.h>
135 +#include <asm/irq.h>
136 +#include <asm/mach-types.h>
137 +#include <asm/mach/arch.h>
138 +#include <asm/mach/flash.h>
140 +static struct flash_platform_data wg302v1_flash_data = {
141 + .map_name = "cfi_probe",
145 +static struct resource wg302v1_flash_resource = {
146 + .flags = IORESOURCE_MEM,
149 +static struct platform_device wg302v1_flash = {
150 + .name = "IXP4XX-Flash",
153 + .platform_data = &wg302v1_flash_data,
155 + .num_resources = 1,
156 + .resource = &wg302v1_flash_resource,
159 +static struct resource wg302v1_uart_resource = {
160 + .start = IXP4XX_UART1_BASE_PHYS,
161 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
162 + .flags = IORESOURCE_MEM,
165 +static struct plat_serial8250_port wg302v1_uart_data[] = {
167 + .mapbase = IXP4XX_UART1_BASE_PHYS,
168 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
169 + .irq = IRQ_IXP4XX_UART1,
170 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
171 + .iotype = UPIO_MEM,
173 + .uartclk = IXP4XX_UART_XTAL,
178 +static struct platform_device wg302v1_uart = {
179 + .name = "serial8250",
180 + .id = PLAT8250_DEV_PLATFORM,
182 + .platform_data = wg302v1_uart_data,
184 + .num_resources = 1,
185 + .resource = &wg302v1_uart_resource,
188 +static struct platform_device *wg302v1_devices[] __initdata = {
193 +static void __init wg302v1_init(void)
197 + wg302v1_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
198 + wg302v1_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
200 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
201 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
203 + platform_add_devices(wg302v1_devices, ARRAY_SIZE(wg302v1_devices));
206 +#ifdef CONFIG_MACH_WG302V1
207 +MACHINE_START(WG302V1, "Netgear WG302 v1 / WAG302 v1")
208 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
209 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
210 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
211 + .map_io = ixp4xx_map_io,
212 + .init_irq = ixp4xx_init_irq,
213 + .timer = &ixp4xx_timer,
214 + .boot_params = 0x0100,
215 + .init_machine = wg302v1_init,