add a netconfig override for the wl-500g (fixes #1116)
[openwrt.git] / target / linux / ixp4xx-2.6 / patches / 200-gateway_7001.patch
1 diff -Nur linux-2.6.19/arch/arm/boot/compressed/head-xscale.S linux-2.6.19-owrt/arch/arm/boot/compressed/head-xscale.S
2 --- linux-2.6.19/arch/arm/boot/compressed/head-xscale.S 2006-11-29 22:57:37.000000000 +0100
3 +++ linux-2.6.19-owrt/arch/arm/boot/compressed/head-xscale.S 2006-12-19 13:17:38.000000000 +0100
4 @@ -46,6 +46,11 @@
5 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
6 #endif
7
8 +#ifdef CONFIG_MACH_GATEWAY7001
9 + mov r7, #(MACH_TYPE_GATEWAY7001 & 0xff)
10 + orr r7, r7, #(MACH_TYPE_GATEWAY7001 & 0xff00)
11 +#endif
12 +
13 #ifdef CONFIG_ARCH_IXP2000
14 mov r1, #-1
15 mov r0, #0xd6000000
16 diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.19-owrt/arch/arm/mach-ixp4xx/coyote-setup.c
17 --- linux-2.6.19/arch/arm/mach-ixp4xx/coyote-setup.c 2006-11-29 22:57:37.000000000 +0100
18 +++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-12-19 13:17:38.000000000 +0100
19 @@ -1,9 +1,10 @@
20 /*
21 * arch/arm/mach-ixp4xx/coyote-setup.c
22 *
23 - * Board setup for ADI Engineering and IXDGP425 boards
24 + * Board setup for ADI Engineering, IXDGP425 and Gateway 7001 boards
25 *
26 * Copyright (C) 2003-2005 MontaVista Software, Inc.
27 + * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org>
28 *
29 * Author: Deepak Saxena <dsaxena@plexity.net>
30 */
31 @@ -73,9 +74,57 @@
32 .resource = &coyote_uart_resource,
33 };
34
35 +/* MACs */
36 +static struct resource res_mac0 = {
37 + .start = IXP4XX_EthB_BASE_PHYS,
38 + .end = IXP4XX_EthB_BASE_PHYS + 0x1ff,
39 + .flags = IORESOURCE_MEM,
40 +};
41 +
42 +static struct resource res_mac1 = {
43 + .start = IXP4XX_EthC_BASE_PHYS,
44 + .end = IXP4XX_EthC_BASE_PHYS + 0x1ff,
45 + .flags = IORESOURCE_MEM,
46 +};
47 +
48 +static struct mac_plat_info plat_mac0 = {
49 + .npe_id = 1,
50 + .phy_id = 0,
51 + .eth_id = 0,
52 + .rxq_id = 27,
53 + .txq_id = 24,
54 +};
55 +
56 +static struct mac_plat_info plat_mac1 = {
57 + .npe_id = 2,
58 + .phy_id = 1,
59 + .eth_id = 1,
60 + .rxq_id = 28,
61 + .txq_id = 25,
62 +};
63 +
64 +static struct platform_device mac0 = {
65 + .name = "ixp4xx_mac",
66 + .id = 0,
67 + .dev.platform_data = &plat_mac0,
68 + .num_resources = 1,
69 + .resource = &res_mac0,
70 +};
71 +
72 +static struct platform_device mac1 = {
73 + .name = "ixp4xx_mac",
74 + .id = 1,
75 + .dev.platform_data = &plat_mac1,
76 + .num_resources = 1,
77 + .resource = &res_mac1,
78 +};
79 +
80 +
81 static struct platform_device *coyote_devices[] __initdata = {
82 &coyote_flash,
83 - &coyote_uart
84 + &coyote_uart,
85 + &mac0,
86 + &mac1
87 };
88
89 static void __init coyote_init(void)
90 @@ -111,6 +160,19 @@
91 MACHINE_END
92 #endif
93
94 +#ifdef CONFIG_MACH_GATEWAY7001
95 +MACHINE_START(GATEWAY7001, "Gateway 7001")
96 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
97 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
98 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
99 + .map_io = ixp4xx_map_io,
100 + .init_irq = ixp4xx_init_irq,
101 + .timer = &ixp4xx_timer,
102 + .boot_params = 0x0100,
103 + .init_machine = coyote_init,
104 +MACHINE_END
105 +#endif
106 +
107 /*
108 * IXDPG425 is identical to Coyote except for which serial port
109 * is connected.
110 diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.19-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c
111 --- linux-2.6.19/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100
112 +++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-12-19 13:18:18.000000000 +0100
113 @@ -0,0 +1,68 @@
114 +/*
115 + * arch/arch/mach-ixp4xx/gateway7001-pci.c
116 + *
117 + * PCI setup routines for Gateway 7001
118 + *
119 + * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
120 + *
121 + * based on coyote-pci.c:
122 + * Copyright (C) 2002 Jungo Software Technologies.
123 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
124 + *
125 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
126 + *
127 + * This program is free software; you can redistribute it and/or modify
128 + * it under the terms of the GNU General Public License version 2 as
129 + * published by the Free Software Foundation.
130 + *
131 + */
132 +
133 +#include <linux/kernel.h>
134 +#include <linux/pci.h>
135 +#include <linux/init.h>
136 +#include <linux/irq.h>
137 +
138 +#include <asm/mach-types.h>
139 +#include <asm/hardware.h>
140 +#include <asm/irq.h>
141 +
142 +#include <asm/mach/pci.h>
143 +
144 +extern void ixp4xx_pci_preinit(void);
145 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
146 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
147 +
148 +void __init gateway7001_pci_preinit(void)
149 +{
150 + set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
151 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
152 +
153 + ixp4xx_pci_preinit();
154 +}
155 +
156 +static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
157 +{
158 + if (slot == 0)
159 + return IRQ_IXP4XX_GPIO10;
160 + else if (slot == 1)
161 + return IRQ_IXP4XX_GPIO11;
162 + else return -1;
163 +}
164 +
165 +struct hw_pci gateway7001_pci __initdata = {
166 + .nr_controllers = 1,
167 + .preinit = gateway7001_pci_preinit,
168 + .swizzle = pci_std_swizzle,
169 + .setup = ixp4xx_setup,
170 + .scan = ixp4xx_scan_bus,
171 + .map_irq = gateway7001_map_irq,
172 +};
173 +
174 +int __init gateway7001_pci_init(void)
175 +{
176 + if (machine_is_gateway7001())
177 + pci_common_init(&gateway7001_pci);
178 + return 0;
179 +}
180 +
181 +subsys_initcall(gateway7001_pci_init);
182 diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Kconfig
183 --- linux-2.6.19/arch/arm/mach-ixp4xx/Kconfig 2006-11-29 22:57:37.000000000 +0100
184 +++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-12-19 13:17:38.000000000 +0100
185 @@ -33,6 +33,14 @@
186 Engineering Coyote Gateway Reference Platform. For more
187 information on this platform, see <file:Documentation/arm/IXP4xx>.
188
189 +config MACH_GATEWAY7001
190 + bool "Gateway 7001"
191 + select PCI
192 + help
193 + Say 'Y' here if you want your kernel to support Gateway's
194 + 7001 Access Point. For more information on this platform,
195 + see http://openwrt.org
196 +
197 config ARCH_IXDP425
198 bool "IXDP425"
199 help
200 diff -Nur linux-2.6.19/arch/arm/mach-ixp4xx/Makefile linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Makefile
201 --- linux-2.6.19/arch/arm/mach-ixp4xx/Makefile 2006-11-29 22:57:37.000000000 +0100
202 +++ linux-2.6.19-owrt/arch/arm/mach-ixp4xx/Makefile 2006-12-19 13:17:38.000000000 +0100
203 @@ -20,5 +20,6 @@
204 obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-setup.o
205 obj-$(CONFIG_MACH_NSLU2) += nslu2-setup.o nslu2-power.o
206 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
207 +obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o
208
209 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
210 diff -Nur linux-2.6.19/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.19-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
211 --- linux-2.6.19/include/asm-arm/arch-ixp4xx/uncompress.h 2006-11-29 22:57:37.000000000 +0100
212 +++ linux-2.6.19-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-12-19 13:17:38.000000000 +0100
213 @@ -38,9 +38,9 @@
214 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
215 {
216 /*
217 - * Coyote and gtwx5715 only have UART2 connected
218 + * Some boards only have UART2 connected
219 */
220 - if (machine_is_adi_coyote() || machine_is_gtwx5715())
221 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001())
222 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
223 else
224 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
This page took 0.047094 seconds and 5 git commands to generate.