aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/mx1ads.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c
index 8ab1b040288c..e34d0df90aed 100644
--- a/arch/arm/mach-imx/mx1ads.c
+++ b/arch/arm/mach-imx/mx1ads.c
@@ -25,6 +25,7 @@
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26 26
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/arch/mmc.h>
28#include <linux/interrupt.h> 29#include <linux/interrupt.h>
29#include "generic.h" 30#include "generic.h"
30 31
@@ -51,12 +52,29 @@ static struct platform_device *devices[] __initdata = {
51 &cs89x0_device, 52 &cs89x0_device,
52}; 53};
53 54
55#ifdef CONFIG_MMC_IMX
56static int mx1ads_mmc_card_present(void)
57{
58 /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */
59 return (SSR(1) & (1 << 20) ? 0 : 1);
60}
61
62static struct imxmmc_platform_data mx1ads_mmc_info = {
63 .card_present = mx1ads_mmc_card_present,
64};
65#endif
66
54static void __init 67static void __init
55mx1ads_init(void) 68mx1ads_init(void)
56{ 69{
57#ifdef CONFIG_LEDS 70#ifdef CONFIG_LEDS
58 imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2); 71 imx_gpio_mode(GPIO_PORTA | GPIO_OUT | 2);
59#endif 72#endif
73#ifdef CONFIG_MMC_IMX
74 /* SD/MMC card detect */
75 imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20);
76 imx_set_mmc_info(&mx1ads_mmc_info);
77#endif
60 platform_add_devices(devices, ARRAY_SIZE(devices)); 78 platform_add_devices(devices, ARRAY_SIZE(devices));
61} 79}
62 80