20 #include <linux/types.h>
24 #include <linux/module.h>
29 #include <linux/input.h>
37 #include <mach/hardware.h>
38 #include <asm/setup.h>
46 #include <mach/board.h>
60 #define HAVE_2MMC (1 << 0)
61 static int inline ek_have_2mmc(
void)
67 static void __init ek_init_early(
void)
95 #if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
97 .modalias =
"mtd_dataflash",
99 .max_speed_hz = 15 * 1000 * 1000,
102 #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD)
104 .modalias =
"mtd_dataflash",
106 .max_speed_hz = 15 * 1000 * 1000,
122 static void __init ek_add_device_macb(
void)
140 .name =
"Partition 1",
145 .name =
"Partition 2",
160 .parts = ek_nand_partition,
167 .ncs_write_setup = 0,
172 .ncs_write_pulse = 4,
182 static void __init ek_add_device_nand(
void)
211 static void __init ek_add_device_mmc(
void)
213 if (ek_have_2mmc()) {
214 ek_mmc_data.
slot[0].bus_width = 4;
216 ek_mmc_data.
slot[0].wp_pin = -1;
224 static struct gpio_led ek_leds[] = {
229 .default_trigger =
"none",
234 .default_trigger =
"heartbeat",
238 static void __init ek_add_device_gpio_leds(
void)
240 if (ek_have_2mmc()) {
251 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
279 .platform_data = &ek_button_data,
283 static void __init ek_add_device_buttons(
void)
293 static void __init ek_add_device_buttons(
void) {}
302 .use_external_triggers =
true,
306 #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
319 .consumer_supplies = ek_audio_consumer_supplies,
320 .num_consumer_supplies =
ARRAY_SIZE(ek_audio_consumer_supplies),
325 .microvolts = 3300000,
327 .enabled_at_boot = 0,
328 .init_data = &ek_avdd_reg_init_data,
331 .
name =
"reg-fixed-voltage",
335 .platform_data = &ek_vdd_pdata,
338 static void __init ek_add_regulators(
void)
343 static void __init ek_add_regulators(
void) {}
357 static void __init ek_board_init(
void)
378 ek_add_device_nand();
380 ek_add_device_macb();
388 ek_add_device_gpio_leds();
390 ek_add_device_buttons();
404 .init_early = ek_init_early,
406 .init_machine = ek_board_init,
409 MACHINE_START(AT91SAM9G20EK_2MMC,
"Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
414 .init_early = ek_init_early,
416 .init_machine = ek_board_init,