]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/avr32/boards/atstk1000/atstk1002.c
Merge commit 'gcl/gcl-next'
[linux-2.6-omap-h63xx.git] / arch / avr32 / boards / atstk1000 / atstk1002.c
index 14dc5a1436957a1a40869d8fbd437b6e0d8dde13..8538ba75ef92c8a1def6ee96caea4557618ae061 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <asm/io.h>
 #include <asm/setup.h>
+#include <asm/atmel-mci.h>
+
 #include <asm/arch/at32ap700x.h>
 #include <asm/arch/board.h>
 #include <asm/arch/init.h>
@@ -260,6 +262,21 @@ void __init setup_board(void)
        at32_setup_serial_console(0);
 }
 
+#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
+
+/* MMC card detect requires MACB0 *NOT* be used */
+#ifdef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM
+static struct mci_platform_data __initdata mci0_data = {
+       .detect_pin     = GPIO_PIN_PC(14),      /* gpio30/sdcd */
+       .wp_pin         = GPIO_PIN_PC(15),      /* gpio31/sdwp */
+};
+#define MCI_PDATA      &mci0_data
+#else
+#define MCI_PDATA      NULL
+#endif /* SW6 for sd{cd,wp} routing */
+
+#endif /* SW2 for MMC signal routing */
+
 static int __init atstk1002_init(void)
 {
        /*
@@ -309,7 +326,7 @@ static int __init atstk1002_init(void)
        at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
 #endif
 #ifndef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
-       at32_add_device_mci(0, NULL);
+       at32_add_device_mci(0, MCI_PDATA);
 #endif
 #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
        set_hw_addr(at32_add_device_eth(1, &eth_data[1]));