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