bump kernel to 3.2.12
[openwrt/staging/dedeckeh.git] / target / linux / lantiq / patches-3.2 / 208-fix-mach-easy98000.patch
1 Index: linux-3.2.9/arch/mips/lantiq/falcon/mach-easy98000.c
2 ===================================================================
3 --- linux-3.2.9.orig/arch/mips/lantiq/falcon/mach-easy98000.c 2012-03-07 19:30:22.000000000 +0100
4 +++ linux-3.2.9/arch/mips/lantiq/falcon/mach-easy98000.c 2012-03-07 19:35:47.804810934 +0100
5 @@ -17,10 +17,11 @@
6 #include <linux/spi/eeprom.h>
7 #include <falcon/lantiq_soc.h>
8
9 +#include <dev-gpio-leds.h>
10 +
11 #include "../machtypes.h"
12
13 #include "devices.h"
14 -#include "dev-leds-gpio.h"
15
16 #define EASY98000_GPIO_LED_0 9
17 #define EASY98000_GPIO_LED_1 10
18 @@ -29,7 +30,16 @@
19 #define EASY98000_GPIO_LED_4 13
20 #define EASY98000_GPIO_LED_5 14
21
22 -extern unsigned char ltq_ethaddr[6];
23 +static unsigned char ltq_ethaddr[6] = {0};
24 +
25 +static int __init falcon_set_ethaddr(char *str)
26 +{
27 + sscanf(str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
28 + &ltq_ethaddr[0], &ltq_ethaddr[1], &ltq_ethaddr[2],
29 + &ltq_ethaddr[3], &ltq_ethaddr[4], &ltq_ethaddr[5]);
30 + return 0;
31 +}
32 +__setup("ethaddr=", falcon_set_ethaddr);
33
34 static struct mtd_partition easy98000_nor_partitions[] =
35 {
36 @@ -70,7 +80,7 @@
37 .platform_data = &easy98000_spi_flash_platform_data
38 };
39
40 -static struct gpio_led easy98000_leds_gpio[] __initdata = {
41 +static struct gpio_led easy98000_gpio_leds[] __initdata = {
42 {
43 .name = "easy98000:green:0",
44 .gpio = EASY98000_GPIO_LED_0,
45 @@ -104,12 +114,11 @@
46
47 static struct dm9000_plat_data dm9000_plat_data = {
48 .flags = DM9000_PLATF_8BITONLY,
49 - //.dev_addr = { }, /* possibility to provide an ethernet address for the chip */
50 };
51
52 static struct resource dm9000_resources[] = {
53 - MEM_RES("dm9000_io", DM9000_IO, DM9000_IO),
54 - MEM_RES("dm9000_data", DM9000_DATA, DM9000_DATA),
55 + MEM_RES("dm9000_io", DM9000_IO, 1),
56 + MEM_RES("dm9000_data", DM9000_DATA, 1),
57 [2] = {
58 /* with irq (210 -> gpio 110) the driver is very unreliable */
59 .start = -1, /* use polling */
60 @@ -214,8 +223,8 @@
61 falcon_register_i2c();
62 platform_device_register(&easy98000_i2c_gpio_device);
63 register_davicom();
64 - ltq_add_device_leds_gpio(-1, ARRAY_SIZE(easy98000_leds_gpio),
65 - easy98000_leds_gpio);
66 + ltq_add_device_gpio_leds(-1, ARRAY_SIZE(easy98000_gpio_leds),
67 + easy98000_gpio_leds);
68 register_easy98000_cpld();
69 easy98000_spi_gpio_init();
70 }