summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremiah Lott <jeremiah.lott@timesys.com>2009-09-17 16:36:41 -0400
committerAndy Voltz <andy.voltz@timesys.com>2010-11-19 12:21:44 -0500
commit9c196edcf46a8c11bee7984c87124033ad8bde26 (patch)
tree03bef796b4e1e8e043600f608673569ade21031c
parent8848f75a1d7d9066b2b1f1e5ce01fe235c103989 (diff)
SD/MMC board support for the mx27lite.
-rw-r--r--arch/arm/mach-mx2/mx27lite.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/mx27lite.c b/arch/arm/mach-mx2/mx27lite.c
index ad8bb0cf6a35..c0a6a5c78313 100644
--- a/arch/arm/mach-mx2/mx27lite.c
+++ b/arch/arm/mach-mx2/mx27lite.c
@@ -36,6 +36,7 @@
#include <mach/imxfb.h>
#include <mach/mxc_ehci.h>
#include <mach/keypad.h>
+#include <mach/mmc.h>
#include "devices.h"
@@ -125,6 +126,13 @@ static unsigned int mx27lite_pins[] = {
PA1_PF_USBH2_DIR,
PA3_PF_USBH2_NXT,
PA4_PF_USBH2_STP,
+ /* SDHC2*/
+ PB4_PF_SD2_D0,
+ PB5_PF_SD2_D1,
+ PB6_PF_SD2_D2,
+ PB7_PF_SD2_D3,
+ PB8_PF_SD2_CMD,
+ PB9_PF_SD2_CLK,
};
static struct mxc_nand_platform_data mx27lite_nand_board_info = {
@@ -274,6 +282,23 @@ static struct platform_device *platform_devices[] __initdata = {
&mxc_keypad_device,
};
+static int mx27ads_sdhc2_init(struct device *dev, irq_handler_t detect_irq,
+ void *data)
+{
+ return request_irq(IRQ_GPIOB(22), detect_irq, IRQF_TRIGGER_RISING,
+ "sdhc2-card-detect", data);
+}
+
+static void mx27ads_sdhc2_exit(struct device *dev, void *data)
+{
+ free_irq(IRQ_GPIOB(22), data);
+}
+
+static struct imxmmc_platform_data sdhc2_pdata = {
+ .init = mx27ads_sdhc2_init,
+ .exit = mx27ads_sdhc2_exit,
+};
+
static void __init mx27lite_init(void)
{
mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins),
@@ -286,6 +311,8 @@ static void __init mx27lite_init(void)
//mxc_register_device(&mxc_otg_host, &usbotg_pdata);
mxc_register_device(&mxc_otg_udc_device, &usbudc_pdata);
mxc_register_device(&mxc_usbh2, &usbh2_pdata);
+
+ mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata);
}
static void __init mx27lite_timer_init(void)