1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/i2c-gpio.h>
4 #include "../machtypes.h"
7 #include "dev-leds-gpio.h"
9 #define BOARD_95C3AM1_GPIO_LED_0 10
10 #define BOARD_95C3AM1_GPIO_LED_1 11
11 #define BOARD_95C3AM1_GPIO_LED_2 12
12 #define BOARD_95C3AM1_GPIO_LED_3 13
14 extern unsigned char ltq_ethaddr
[6];
16 static struct mtd_partition board_95C3AM1_partitions
[] =
26 .size
= 0x40000, /* 2 sectors for redundant env. */
31 .size
= 0xF80000, /* map only 16 MiB */
35 static struct flash_platform_data board_95C3AM1_flash_platform_data
= {
37 .parts
= board_95C3AM1_partitions
,
38 .nr_parts
= ARRAY_SIZE(board_95C3AM1_partitions
)
41 static struct spi_board_info board_95C3AM1_flash_data __initdata
= {
45 .max_speed_hz
= 10 * 1000 * 1000,
47 .platform_data
= &board_95C3AM1_flash_platform_data
50 static struct gpio_led board_95C3AM1_leds_gpio
[] __initdata
= {
53 .gpio
= BOARD_95C3AM1_GPIO_LED_0
,
57 .gpio
= BOARD_95C3AM1_GPIO_LED_1
,
61 .gpio
= BOARD_95C3AM1_GPIO_LED_2
,
65 .gpio
= BOARD_95C3AM1_GPIO_LED_3
,
70 static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data
= {
75 static struct platform_device board_95C3AM1_i2c_gpio_device
= {
79 .platform_data
= &board_95C3AM1_i2c_gpio_data
,
83 static void __init
board_95C3AM1_init(void)
85 falcon_register_i2c();
86 falcon_register_spi_flash(&board_95C3AM1_flash_data
);
87 platform_device_register(&board_95C3AM1_i2c_gpio_device
);
88 ltq_add_device_leds_gpio(-1, ARRAY_SIZE(board_95C3AM1_leds_gpio
),
89 board_95C3AM1_leds_gpio
);
92 MIPS_MACHINE(LANTIQ_MACH_95C3AM1
,