1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/i2c-gpio.h>
5 #include <dev-gpio-leds.h>
7 #include "../machtypes.h"
10 #define BOARD_95C3AM1_GPIO_LED_0 10
11 #define BOARD_95C3AM1_GPIO_LED_1 11
12 #define BOARD_95C3AM1_GPIO_LED_2 12
13 #define BOARD_95C3AM1_GPIO_LED_3 13
15 extern unsigned char ltq_ethaddr
[6];
17 static struct mtd_partition board_95C3AM1_partitions
[] =
27 .size
= 0x40000, /* 2 sectors for redundant env. */
32 .size
= 0xF80000, /* map only 16 MiB */
36 static struct flash_platform_data board_95C3AM1_flash_platform_data
= {
38 .parts
= board_95C3AM1_partitions
,
39 .nr_parts
= ARRAY_SIZE(board_95C3AM1_partitions
)
42 static struct spi_board_info board_95C3AM1_flash_data __initdata
= {
46 .max_speed_hz
= 10 * 1000 * 1000,
48 .platform_data
= &board_95C3AM1_flash_platform_data
51 static struct gpio_led board_95C3AM1_gpio_leds
[] __initdata
= {
54 .gpio
= BOARD_95C3AM1_GPIO_LED_0
,
58 .gpio
= BOARD_95C3AM1_GPIO_LED_1
,
62 .gpio
= BOARD_95C3AM1_GPIO_LED_2
,
66 .gpio
= BOARD_95C3AM1_GPIO_LED_3
,
71 static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data
= {
76 static struct platform_device board_95C3AM1_i2c_gpio_device
= {
80 .platform_data
= &board_95C3AM1_i2c_gpio_data
,
84 static void __init
board_95C3AM1_init(void)
86 falcon_register_i2c();
87 falcon_register_spi_flash(&board_95C3AM1_flash_data
);
88 platform_device_register(&board_95C3AM1_i2c_gpio_device
);
89 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(board_95C3AM1_gpio_leds
),
90 board_95C3AM1_gpio_leds
);
93 MIPS_MACHINE(LANTIQ_MACH_95C3AM1
,