public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marek.vasut@gmail•com (Marek Vasut)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/4] pxa/colibri270: Add MMC support
Date: Tue, 11 May 2010 04:26:56 +0200	[thread overview]
Message-ID: <1273544818-22305-2-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1273544818-22305-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail•com>
---
 arch/arm/mach-pxa/colibri-pxa270.c       |   31 ++++++++++++++++++++++++++++++
 arch/arm/mach-pxa/include/mach/colibri.h |    1 +
 2 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 4519e89..5490c5f 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -33,6 +33,7 @@
 
 #include <mach/pxa27x.h>
 #include <mach/colibri.h>
+#include <mach/mmc.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -44,6 +45,15 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
 	/* Ethernet */
 	GPIO78_nCS_2,	/* Ethernet CS */
 	GPIO114_GPIO,	/* Ethernet IRQ */
+
+	/* MMC */
+	GPIO32_MMC_CLK,
+	GPIO92_MMC_DAT_0,
+	GPIO109_MMC_DAT_1,
+	GPIO110_MMC_DAT_2,
+	GPIO111_MMC_DAT_3,
+	GPIO112_MMC_CMD,
+	GPIO0_GPIO,	/* SD detect */
 };
 
 /******************************************************************************
@@ -138,6 +148,26 @@ static void __init colibri_pxa270_eth_init(void)
 static inline void colibri_pxa270_eth_init(void) {}
 #endif
 
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
+static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
+	.ocr_mask		= MMC_VDD_32_33 | MMC_VDD_33_34,
+	.gpio_power		= -1,
+	.gpio_card_detect	= GPIO0_COLIBRI_PXA270_SD_DETECT,
+	.gpio_card_ro		= -1,
+	.detect_delay_ms	= 200,
+};
+
+static void __init colibri_pxa270_mmc_init(void)
+{
+	pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
+}
+#else
+static inline void colibri_pxa270_mmc_init(void) {}
+#endif
+
 static void __init colibri_pxa270_init(void)
 {
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
@@ -147,6 +177,7 @@ static void __init colibri_pxa270_init(void)
 
 	colibri_pxa270_nor_init();
 	colibri_pxa270_eth_init();
+	colibri_pxa270_mmc_init();
 }
 
 MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index 0b24a20..08bee63 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -34,6 +34,7 @@ static inline void colibri_pxa3xx_init_nand(void) {}
 
 /* GPIO definitions for Colibri PXA270 */
 #define GPIO114_COLIBRI_PXA270_ETH_IRQ	114
+#define GPIO0_COLIBRI_PXA270_SD_DETECT	0
 
 #endif /* _COLIBRI_H_ */
 
-- 
1.7.0

  reply	other threads:[~2010-05-11  2:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11  2:26 [PATCH 1/4] pxa/colibri270: Refactor board definition file Marek Vasut
2010-05-11  2:26 ` Marek Vasut [this message]
2010-05-11  8:52   ` [PATCH 2/4] pxa/colibri270: Add MMC support Daniel Mack
2010-05-11 10:46     ` Eric Miao
2010-05-11 10:48       ` Daniel Mack
2010-05-11  2:26 ` [PATCH 3/4] pxa/colibri270: Add FFUART MFP Marek Vasut
2010-05-11  2:26 ` [PATCH 4/4] pxa/colibri270: Add UHC support Marek Vasut
2010-05-11  8:48 ` [PATCH 1/4] pxa/colibri270: Refactor board definition file Daniel Mack
2010-05-14 10:37 ` Daniel Mack
2010-05-19  6:36   ` Daniel Mack
2010-05-21  2:36     ` Eric Miao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273544818-22305-2-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox