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 static struct mtd_partition board_95C3AM1_partitions
[] =
25 .size
= 0x40000, /* 2 sectors for redundant env. */
30 .size
= 0xF80000, /* map only 16 MiB */
34 static struct flash_platform_data board_95C3AM1_flash_platform_data
= {
36 .parts
= board_95C3AM1_partitions
,
37 .nr_parts
= ARRAY_SIZE(board_95C3AM1_partitions
)
40 static struct spi_board_info board_95C3AM1_flash_data __initdata
= {
44 .max_speed_hz
= 10 * 1000 * 1000,
46 .platform_data
= &board_95C3AM1_flash_platform_data
49 static struct gpio_led board_95C3AM1_gpio_leds
[] __initdata
= {
52 .gpio
= BOARD_95C3AM1_GPIO_LED_0
,
56 .gpio
= BOARD_95C3AM1_GPIO_LED_1
,
60 .gpio
= BOARD_95C3AM1_GPIO_LED_2
,
64 .gpio
= BOARD_95C3AM1_GPIO_LED_3
,
69 static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data
= {
74 static struct platform_device board_95C3AM1_i2c_gpio_device
= {
78 .platform_data
= &board_95C3AM1_i2c_gpio_data
,
82 static void __init
board_95C3AM1_init(void)
84 falcon_register_i2c();
85 falcon_register_spi_flash(&board_95C3AM1_flash_data
);
86 platform_device_register(&board_95C3AM1_i2c_gpio_device
);
87 ltq_add_device_gpio_leds(-1, ARRAY_SIZE(board_95C3AM1_gpio_leds
),
88 board_95C3AM1_gpio_leds
);
91 MIPS_MACHINE(LANTIQ_MACH_95C3AM1
,