aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-05-21 18:29:34 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-06-18 03:07:33 -0400
commitd01b8d64949dd39ffe2cbe8068b82fb83f82f43c (patch)
tree0e8a7edec7c1ec1d55a0bb98e8b1507f93e63f84 /arch/arm/mach-pxa
parentf95bb54016ae2465a74f5eeb04b539ef213ce6c9 (diff)
[ARM] pxa/colibri270: Add MMC support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c31
-rw-r--r--arch/arm/mach-pxa/include/mach/colibri.h1
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 f8b3bfba3d91..cbaf0196c747 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -33,6 +33,7 @@
33 33
34#include <mach/pxa27x.h> 34#include <mach/pxa27x.h>
35#include <mach/colibri.h> 35#include <mach/colibri.h>
36#include <mach/mmc.h>
36 37
37#include "generic.h" 38#include "generic.h"
38#include "devices.h" 39#include "devices.h"
@@ -44,6 +45,15 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
44 /* Ethernet */ 45 /* Ethernet */
45 GPIO78_nCS_2, /* Ethernet CS */ 46 GPIO78_nCS_2, /* Ethernet CS */
46 GPIO114_GPIO, /* Ethernet IRQ */ 47 GPIO114_GPIO, /* Ethernet IRQ */
48
49 /* MMC */
50 GPIO32_MMC_CLK,
51 GPIO92_MMC_DAT_0,
52 GPIO109_MMC_DAT_1,
53 GPIO110_MMC_DAT_2,
54 GPIO111_MMC_DAT_3,
55 GPIO112_MMC_CMD,
56 GPIO0_GPIO, /* SD detect */
47}; 57};
48 58
49/****************************************************************************** 59/******************************************************************************
@@ -138,6 +148,26 @@ static void __init colibri_pxa270_eth_init(void)
138static inline void colibri_pxa270_eth_init(void) {} 148static inline void colibri_pxa270_eth_init(void) {}
139#endif 149#endif
140 150
151/******************************************************************************
152 * SD/MMC card controller
153 ******************************************************************************/
154#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
155static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
156 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
157 .gpio_power = -1,
158 .gpio_card_detect = GPIO0_COLIBRI_PXA270_SD_DETECT,
159 .gpio_card_ro = -1,
160 .detect_delay_ms = 200,
161};
162
163static void __init colibri_pxa270_mmc_init(void)
164{
165 pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
166}
167#else
168static inline void colibri_pxa270_mmc_init(void) {}
169#endif
170
141static void __init colibri_pxa270_init(void) 171static void __init colibri_pxa270_init(void)
142{ 172{
143 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); 173 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
@@ -147,6 +177,7 @@ static void __init colibri_pxa270_init(void)
147 177
148 colibri_pxa270_nor_init(); 178 colibri_pxa270_nor_init();
149 colibri_pxa270_eth_init(); 179 colibri_pxa270_eth_init();
180 colibri_pxa270_mmc_init();
150} 181}
151 182
152MACHINE_START(COLIBRI, "Toradex Colibri PXA270") 183MACHINE_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 9e47e1fb1f04..c5492366349a 100644
--- a/arch/arm/mach-pxa/include/mach/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
@@ -35,6 +35,7 @@ static inline void colibri_pxa3xx_init_nand(void) {}
35 35
36/* GPIO definitions for Colibri PXA270 */ 36/* GPIO definitions for Colibri PXA270 */
37#define GPIO114_COLIBRI_PXA270_ETH_IRQ 114 37#define GPIO114_COLIBRI_PXA270_ETH_IRQ 114
38#define GPIO0_COLIBRI_PXA270_SD_DETECT 0
38 39
39#endif /* _COLIBRI_H_ */ 40#endif /* _COLIBRI_H_ */
40 41