>From cc32b29e540d0f53a5badb0ec27a6f9252bb0648 Mon Sep 17 00:00:00 2001
From: Philip Rakity <prak...@marvell.com>
Date: Sun, 19 Dec 2010 20:18:29 -0800
Subject: [PATCH] plat-pxa: add infrastructure support for multiple sd card slots

enable mmc1, 2, and 3.  eMMC and Wifi are marked PERMANENT
eMMC is enabled as a 8 bit device

Note: eMMC is set to boot first to workaround problem where
booting in logical order requires mmc create work queue
to be multi-threaded.

Signed-off-by: Mark F. Brown <ma...@marvell.com>
Signed-off-by: Philip Rakity <prak...@marvell.com>
---
 arch/arm/mach-mmp/brownstone.c         |   13 ++++++++++++-
 arch/arm/plat-pxa/include/plat/sdhci.h |    1 +
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index 635c400..1f11744 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -145,6 +145,15 @@ static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
        .max_speed      = 25000000,
 };
 
+static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc1 = {
+       .flags          = PXA_FLAG_CARD_PERMANENT,
+};
+
+static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc2 = {
+       .flags          = PXA_FLAG_CARD_PERMANENT |
+                               PXA_FLAG_SD_8_BIT_CAPABLE_SLOT,
+};
+
 static void __init brownstone_init(void)
 {
        mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
@@ -153,7 +162,9 @@ static void __init brownstone_init(void)
        mmp2_add_uart(1);
        mmp2_add_uart(3);
        mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info));
-       mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
+       mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */
+       mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD Slot */
+       mmp2_add_sdhost(1, &mmp2_sdh_platdata_mmc1); /* Wifi */
 }
 
 MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
diff --git a/arch/arm/plat-pxa/include/plat/sdhci.h 
b/arch/arm/plat-pxa/include/plat/sdhci.h
index 224e28c..2762f99 100644
--- a/arch/arm/plat-pxa/include/plat/sdhci.h
+++ b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,7 @@
 /* pxa specific flag */
 /* Require clock free running */
 
+#define PXA_FLAG_CARD_PERMANENT                (1<<1)
 /* Board design supports 8-bit data on SD/SDIO BUS */
 #define PXA_FLAG_SD_8_BIT_CAPABLE_SLOT (1<<2)
 
-- 
1.6.0.4

Attachment: 0010-plat-pxa-add-infrastructure-support-for-multiple-sd.patch
Description: 0010-plat-pxa-add-infrastructure-support-for-multiple-sd.patch

Reply via email to