diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-11-11 09:03:28 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-03-13 05:34:38 -0400 |
commit | f2cb641f565dccebfa934b1a940bc6517734d391 (patch) | |
tree | b048f67f54859f16174be7f0dfa5ee2166dad942 /arch/arm/mach-mx3 | |
parent | 2adc1d654e41f4308193fdd46cee885b7a35c149 (diff) |
pcm037: Add sdhc support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/pcm037.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 7743c13bebad..5fce022114de 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/iomux-mx3.h> | 39 | #include <mach/iomux-mx3.h> |
40 | #include <mach/board-pcm037.h> | 40 | #include <mach/board-pcm037.h> |
41 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
42 | #include <mach/mmc.h> | ||
42 | #ifdef CONFIG_I2C_IMX | 43 | #ifdef CONFIG_I2C_IMX |
43 | #include <mach/i2c.h> | 44 | #include <mach/i2c.h> |
44 | #endif | 45 | #endif |
@@ -162,6 +163,32 @@ static struct i2c_board_info pcm037_i2c_devices[] = { | |||
162 | }; | 163 | }; |
163 | #endif | 164 | #endif |
164 | 165 | ||
166 | static int sdhc1_pins[] = { | ||
167 | MX31_PIN_SD1_DATA3__SD1_DATA3, | ||
168 | MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
169 | MX31_PIN_SD1_DATA1__SD1_DATA1, | ||
170 | MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
171 | MX31_PIN_SD1_CLK__SD1_CLK, | ||
172 | MX31_PIN_SD1_CMD__SD1_CMD, | ||
173 | }; | ||
174 | |||
175 | static int pcm970_sdhc1_init(struct device *dev, irq_handler_t h, void *data) | ||
176 | { | ||
177 | return mxc_iomux_setup_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins), | ||
178 | "sdhc-1"); | ||
179 | } | ||
180 | |||
181 | static void pcm970_sdhc1_exit(struct device *dev, void *data) | ||
182 | { | ||
183 | mxc_iomux_release_multiple_pins(sdhc1_pins, ARRAY_SIZE(sdhc1_pins)); | ||
184 | } | ||
185 | |||
186 | /* No card and rw detection at the moment */ | ||
187 | static struct imxmmc_platform_data sdhc_pdata = { | ||
188 | .init = pcm970_sdhc1_init, | ||
189 | .exit = pcm970_sdhc1_exit, | ||
190 | }; | ||
191 | |||
165 | static struct platform_device *devices[] __initdata = { | 192 | static struct platform_device *devices[] __initdata = { |
166 | &pcm037_flash, | 193 | &pcm037_flash, |
167 | &pcm037_eth, | 194 | &pcm037_eth, |
@@ -208,6 +235,7 @@ static void __init mxc_board_init(void) | |||
208 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); | 235 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); |
209 | #endif | 236 | #endif |
210 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 237 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); |
238 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | ||
211 | } | 239 | } |
212 | 240 | ||
213 | static void __init pcm037_timer_init(void) | 241 | static void __init pcm037_timer_init(void) |