1 Index: linux-3.0.3/arch/mips/lantiq/machtypes.h
2 ===================================================================
3 --- linux-3.0.3.orig/arch/mips/lantiq/machtypes.h 2011-10-05 14:32:23.173150836 +0200
4 +++ linux-3.0.3/arch/mips/lantiq/machtypes.h 2011-10-05 14:32:23.385150846 +0200
6 LANTIQ_MACH_EASY98000, /* Falcon Eval Board, NOR Flash */
7 LANTIQ_MACH_EASY98000SF, /* Falcon Eval Board, Serial Flash */
8 LANTIQ_MACH_EASY98000NAND, /* Falcon Eval Board, NAND Flash */
9 + LANTIQ_MACH_EASY98020, /* EASY98020 Eval Board */
10 + LANTIQ_MACH_EASY98020_1LAN, /* EASY98020 Eval Board (1 LAN port) */
11 + LANTIQ_MACH_EASY98020_2LAN, /* EASY98020 Eval Board (2 LAN port) */
12 + LANTIQ_MACH_95C3AM1, /* 95C3AM1 Eval Board */
15 LANTIQ_MACH_FRITZ3370, /* FRITZ!BOX 3370 vdsl cpe */
18 + LANTIQ_MACH_ARV3527P, /* Arcor easybox a401 */
19 + LANTIQ_MACH_ARV4510PW, /* Wippies Homebox */
20 + LANTIQ_MACH_ARV4518PW, /* Airties WAV-221, SMC-7908A-ISP */
21 + LANTIQ_MACH_ARV4520PW, /* Airties WAV-281, Arcor EasyboxA800 */
22 + LANTIQ_MACH_ARV452CPW, /* Arcor EasyboxA801 */
23 + LANTIQ_MACH_ARV4525PW, /* Speedport W502V */
24 + LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */
25 + LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */
26 + LANTIQ_MACH_ARV7518PW, /* ASTORIA */
29 + LANTIQ_MACH_DGN3500B, /* Netgear DGN3500 */
32 + LANTIQ_MACH_GIGASX76X, /* Gigaset SX76x */
35 + LANTIQ_MACH_WBMR, /* WBMR-HP-G300H */
39 Index: linux-3.0.3/arch/mips/lantiq/xway/Kconfig
40 ===================================================================
41 --- linux-3.0.3.orig/arch/mips/lantiq/xway/Kconfig 2011-10-05 14:32:23.173150836 +0200
42 +++ linux-3.0.3/arch/mips/lantiq/xway/Kconfig 2011-10-05 14:32:23.385150846 +0200
44 bool "Easy50712 - Danube"
47 +config LANTIQ_MACH_ARV45XX
51 +config LANTIQ_MACH_NETGEAR
55 +config LANTIQ_MACH_GIGASX76X
59 +config LANTIQ_MACH_WBMR
60 + bool "WBMR-HP-G300H"
66 Index: linux-3.0.3/arch/mips/lantiq/xway/Makefile
67 ===================================================================
68 --- linux-3.0.3.orig/arch/mips/lantiq/xway/Makefile 2011-10-05 14:32:23.173150836 +0200
69 +++ linux-3.0.3/arch/mips/lantiq/xway/Makefile 2011-10-05 15:46:10.061340080 +0200
71 obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
72 obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
73 obj-$(CONFIG_LANTIQ_MACH_FRITZ3370) += mach-fritz.o
74 +obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
75 +obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
76 +obj-$(CONFIG_LANTIQ_MACH_GIGASX76X) += mach-gigasx76x.o
77 +obj-$(CONFIG_LANTIQ_MACH_WBMR) += mach-wbmr.o
78 Index: linux-3.0.3/arch/mips/lantiq/falcon/Kconfig
79 ===================================================================
80 --- linux-3.0.3.orig/arch/mips/lantiq/falcon/Kconfig 2011-10-05 14:32:22.745150818 +0200
81 +++ linux-3.0.3/arch/mips/lantiq/falcon/Kconfig 2011-10-05 14:32:23.385150846 +0200
86 +config LANTIQ_MACH_EASY98020
90 +config LANTIQ_MACH_95C3AM1
97 Index: linux-3.0.3/arch/mips/lantiq/falcon/Makefile
98 ===================================================================
99 --- linux-3.0.3.orig/arch/mips/lantiq/falcon/Makefile 2011-10-05 14:32:23.089150832 +0200
100 +++ linux-3.0.3/arch/mips/lantiq/falcon/Makefile 2011-10-05 14:32:23.389150846 +0200
102 obj-y := clk.o prom.o reset.o sysctrl.o devices.o gpio.o softdog_vpe.o
103 +obj-$(CONFIG_LANTIQ_MACH_EASY98000) += addon-easy98000.o
104 +obj-$(CONFIG_LANTIQ_MACH_EASY98000) += dev-leds-easy98000-cpld.o
105 obj-$(CONFIG_LANTIQ_MACH_EASY98000) += mach-easy98000.o
106 +obj-$(CONFIG_LANTIQ_MACH_EASY98020) += mach-easy98020.o
107 +obj-$(CONFIG_LANTIQ_MACH_95C3AM1) += mach-95C3AM1.o
108 Index: linux-3.0.3/arch/mips/lantiq/falcon/mach-easy98000.c
109 ===================================================================
110 --- linux-3.0.3.orig/arch/mips/lantiq/falcon/mach-easy98000.c 2011-10-05 15:17:45.445267210 +0200
111 +++ linux-3.0.3/arch/mips/lantiq/falcon/mach-easy98000.c 2011-10-05 15:45:54.153339399 +0200
114 - * This program is free software; you can redistribute it and/or modify it
115 - * under the terms of the GNU General Public License version 2 as published
116 - * by the Free Software Foundation.
118 - * Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.com>
119 - * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
122 +#include <linux/init.h>
123 #include <linux/platform_device.h>
124 +#include <linux/leds.h>
125 +#include <linux/gpio.h>
126 +#include <linux/gpio_buttons.h>
127 +#include <linux/etherdevice.h>
128 +#include <linux/mtd/mtd.h>
129 #include <linux/mtd/partitions.h>
130 +#include <linux/mtd/physmap.h>
131 +#include <linux/input.h>
132 +#include <linux/interrupt.h>
133 +#include <linux/dm9000.h>
134 +#include <linux/i2c.h>
135 +#include <linux/i2c-gpio.h>
136 #include <linux/spi/spi.h>
137 #include <linux/spi/spi_gpio.h>
138 #include <linux/spi/eeprom.h>
139 +#include <falcon/lantiq_soc.h>
141 #include "../machtypes.h"
144 +#include "dev-leds-gpio.h"
146 +#define EASY98000_GPIO_LED_0 9
147 +#define EASY98000_GPIO_LED_1 10
148 +#define EASY98000_GPIO_LED_2 11
149 +#define EASY98000_GPIO_LED_3 12
150 +#define EASY98000_GPIO_LED_4 13
151 +#define EASY98000_GPIO_LED_5 14
153 +extern unsigned char ltq_ethaddr[6];
155 -static struct mtd_partition easy98000_nor_partitions[] = {
156 +static struct mtd_partition easy98000_nor_partitions[] =
165 -struct physmap_flash_data easy98000_nor_flash_data = {
166 +static struct physmap_flash_data easy98000_nor_flash_data = {
167 .nr_parts = ARRAY_SIZE(easy98000_nor_partitions),
168 .parts = easy98000_nor_partitions,
171 .platform_data = &easy98000_spi_flash_platform_data
174 +static struct gpio_led easy98000_leds_gpio[] __initdata = {
176 + .name = "easy98000:green:0",
177 + .gpio = EASY98000_GPIO_LED_0,
180 + .name = "easy98000:green:1",
181 + .gpio = EASY98000_GPIO_LED_1,
184 + .name = "easy98000:green:2",
185 + .gpio = EASY98000_GPIO_LED_2,
188 + .name = "easy98000:green:3",
189 + .gpio = EASY98000_GPIO_LED_3,
192 + .name = "easy98000:green:4",
193 + .gpio = EASY98000_GPIO_LED_4,
196 + .name = "easy98000:green:5",
197 + .gpio = EASY98000_GPIO_LED_5,
202 +#define CONFIG_DM9000_BASE 0x14000000
203 +#define DM9000_IO (CONFIG_DM9000_BASE + 3)
204 +#define DM9000_DATA (CONFIG_DM9000_BASE + 1)
206 +static struct dm9000_plat_data dm9000_plat_data = {
207 + .flags = DM9000_PLATF_8BITONLY,
208 + //.dev_addr = { }, /* possibility to provide an ethernet address for the chip */
211 +static struct resource dm9000_resources[] = {
212 + MEM_RES("dm9000_io", DM9000_IO, DM9000_IO),
213 + MEM_RES("dm9000_data", DM9000_DATA, DM9000_DATA),
215 + /* with irq (210 -> gpio 110) the driver is very unreliable */
216 + .start = -1, /* use polling */
218 + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
222 +static struct platform_device dm9000_platform = {
225 + .num_resources = ARRAY_SIZE(dm9000_resources),
226 + .resource = dm9000_resources,
228 + .platform_data = (void *) &dm9000_plat_data,
232 +extern int easy98000_addon_has_dm9000(void);
233 +static void __init register_davicom(void)
235 + if (!easy98000_addon_has_dm9000())
238 + if (!is_valid_ether_addr(ltq_ethaddr))
239 + random_ether_addr(dm9000_plat_data.dev_addr);
241 + memcpy(dm9000_plat_data.dev_addr, ltq_ethaddr, 6);
242 + /* change to "Locally Administered Address" */
243 + dm9000_plat_data.dev_addr[0] |= 0x2;
245 + platform_device_register(&dm9000_platform);
248 +static struct i2c_gpio_platform_data easy98000_i2c_gpio_data = {
253 +static struct platform_device easy98000_i2c_gpio_device = {
254 + .name = "i2c-gpio",
257 + .platform_data = &easy98000_i2c_gpio_data,
261 +void __init register_easy98000_cpld(void)
263 + platform_device_register_simple("easy98000_cpld_led", 0, NULL, 0);
264 + platform_device_register_simple("easy98000_addon", 0, NULL, 0);
267 /* setup gpio based spi bus/device for access to the eeprom on the board */
268 -#define SPI_GPIO_MRST 102
269 -#define SPI_GPIO_MTSR 103
270 -#define SPI_GPIO_CLK 104
271 -#define SPI_GPIO_CS0 105
272 -#define SPI_GPIO_CS1 106
273 +#define SPI_GPIO_MRST 102
274 +#define SPI_GPIO_MTSR 103
275 +#define SPI_GPIO_CLK 104
276 +#define SPI_GPIO_CS0 105
277 +#define SPI_GPIO_CS1 106
278 #define SPI_GPIO_BUS_NUM 1
280 static struct spi_gpio_platform_data easy98000_spi_gpio_data = {
282 .platform_data = &at25160n,
286 -easy98000_init_common(void)
287 +static void __init easy98000_spi_gpio_init(void)
289 spi_register_board_info(&easy98000_spi_gpio_devices, 1);
290 platform_device_register(&easy98000_spi_gpio_device);
294 -easy98000_init(void)
295 +static void __init easy98000_init_common(void)
297 + falcon_register_i2c();
298 + platform_device_register(&easy98000_i2c_gpio_device);
299 + register_davicom();
300 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(easy98000_leds_gpio),
301 + easy98000_leds_gpio);
302 + register_easy98000_cpld();
303 + easy98000_spi_gpio_init();
306 +static void __init easy98000_init(void)
308 easy98000_init_common();
309 ltq_register_nor(&easy98000_nor_flash_data);
313 -easy98000sf_init(void)
314 +static void __init easy98000sf_init(void)
316 easy98000_init_common();
317 falcon_register_spi_flash(&easy98000_spi_flash_data);
321 -easy98000nand_init(void)
322 +static void __init easy98000nand_init(void)
324 easy98000_init_common();
325 falcon_register_nand();