24 #include <linux/types.h>
27 #include <linux/module.h>
32 #include <linux/input.h>
35 #include <asm/setup.h>
43 #include <mach/hardware.h>
44 #include <mach/board.h>
53 static void __init ek_init_early(
void)
76 static void __init ek_add_device_udc(
void)
78 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
84 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
85 #define MMC_SPI_CARD_DETECT_INT AT91_PIN_PC4
86 static int at91_mmc_spi_init(
struct device *
dev,
93 "mmc-spi-detect", data);
96 static void at91_mmc_spi_exit(
struct device *dev,
void *data)
102 .
init = at91_mmc_spi_init,
103 .exit = at91_mmc_spi_exit,
113 .modalias =
"mtd_dataflash",
115 .max_speed_hz = 15 * 1000 * 1000,
121 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
123 .modalias =
"mmc_spi",
124 .max_speed_hz = 20000000,
127 .platform_data = &at91_mmc_spi_pdata,
133 static void __init ek_add_device_spi(
void)
135 if (machine_is_usb_a9263())
137 else if (machine_is_usb_a9g20())
149 static void __init ek_add_device_eth(
void)
151 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
166 .name =
"bareboxenv",
170 .name =
"bareboxenv2",
200 .parts = ek_nand_partition,
207 .ncs_write_setup = 0,
212 .ncs_write_pulse = 3,
225 .ncs_write_setup = 0,
230 .ncs_write_pulse = 4,
240 static void __init ek_add_device_nand(
void)
242 if (machine_is_usb_a9260() || machine_is_usb_a9g20()) {
248 if (machine_is_usb_a9g20())
260 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
281 .platform_data = &ek_button_data,
285 static void __init ek_add_device_buttons(
void)
293 static void __init ek_add_device_buttons(
void) {}
299 static struct gpio_led ek_leds[] = {
304 .default_trigger =
"heartbeat",
314 static void __init ek_add_device_leds(
void)
316 if (machine_is_usb_a9260() || machine_is_usb_a9g20())
322 static void __init ek_board_init(
void)
337 ek_add_device_nand();
339 ek_add_device_buttons();
341 ek_add_device_leds();
343 if (machine_is_usb_a9g20()) {
361 .init_early = ek_init_early,
363 .init_machine = ek_board_init,
371 .init_early = ek_init_early,
373 .init_machine = ek_board_init,
381 .init_early = ek_init_early,
383 .init_machine = ek_board_init,