aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/configs/magician_defconfig16
-rw-r--r--arch/arm/mach-pxa/magician.c40
2 files changed, 55 insertions, 1 deletions
diff --git a/arch/arm/configs/magician_defconfig b/arch/arm/configs/magician_defconfig
index b9b234bdb36d..b35958b50c65 100644
--- a/arch/arm/configs/magician_defconfig
+++ b/arch/arm/configs/magician_defconfig
@@ -836,7 +836,21 @@ CONFIG_SND_PXA2XX_SOC=m
836# CONFIG_HID_SUPPORT is not set 836# CONFIG_HID_SUPPORT is not set
837CONFIG_HID=m 837CONFIG_HID=m
838# CONFIG_USB_SUPPORT is not set 838# CONFIG_USB_SUPPORT is not set
839# CONFIG_MMC is not set 839CONFIG_MMC=y
840# CONFIG_MMC_DEBUG is not set
841# CONFIG_MMC_UNSAFE_RESUME is not set
842
843#
844# MMC/SD Card Drivers
845#
846CONFIG_MMC_BLOCK=y
847CONFIG_MMC_BLOCK_BOUNCE=y
848CONFIG_SDIO_UART=m
849
850#
851# MMC/SD Host Controller Drivers
852#
853CONFIG_MMC_PXA=y
840# CONFIG_NEW_LEDS is not set 854# CONFIG_NEW_LEDS is not set
841CONFIG_RTC_LIB=y 855CONFIG_RTC_LIB=y
842CONFIG_RTC_CLASS=y 856CONFIG_RTC_CLASS=y
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 159f6dc4543a..a931c384d49d 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -31,6 +31,7 @@
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/pxafb.h> 32#include <asm/arch/pxafb.h>
33#include <asm/arch/i2c.h> 33#include <asm/arch/i2c.h>
34#include <asm/arch/mmc.h>
34#include <asm/arch/irda.h> 35#include <asm/arch/irda.h>
35#include <asm/arch/ohci.h> 36#include <asm/arch/ohci.h>
36 37
@@ -202,6 +203,44 @@ static struct platform_device backlight = {
202 203
203 204
204/* 205/*
206 * MMC/SD
207 */
208
209static int magician_mci_init(struct device *dev,
210 irq_handler_t detect_irq, void *data)
211{
212 return request_irq(IRQ_MAGICIAN_SD, detect_irq,
213 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
214 "MMC card detect", data);
215}
216
217static void magician_mci_setpower(struct device *dev, unsigned int vdd)
218{
219 struct pxamci_platform_data *pdata = dev->platform_data;
220
221 gpio_set_value(EGPIO_MAGICIAN_SD_POWER, (1 << vdd) & pdata->ocr_mask);
222}
223
224static int magician_mci_get_ro(struct device *dev)
225{
226 return (!gpio_get_value(EGPIO_MAGICIAN_nSD_READONLY));
227}
228
229static void magician_mci_exit(struct device *dev, void *data)
230{
231 free_irq(IRQ_MAGICIAN_SD, data);
232}
233
234static struct pxamci_platform_data magician_mci_info = {
235 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
236 .init = magician_mci_init,
237 .get_ro = magician_mci_get_ro,
238 .setpower = magician_mci_setpower,
239 .exit = magician_mci_exit,
240};
241
242
243/*
205 * USB OHCI 244 * USB OHCI
206 */ 245 */
207 246
@@ -267,6 +306,7 @@ static void __init magician_init(void)
267{ 306{
268 platform_add_devices(devices, ARRAY_SIZE(devices)); 307 platform_add_devices(devices, ARRAY_SIZE(devices));
269 pxa_set_i2c_info(NULL); 308 pxa_set_i2c_info(NULL);
309 pxa_set_mci_info(&magician_mci_info);
270 pxa_set_ohci_info(&magician_ohci_info); 310 pxa_set_ohci_info(&magician_ohci_info);
271 pxa_set_ficp_info(&magician_ficp_info); 311 pxa_set_ficp_info(&magician_ficp_info);
272 set_pxa_fb_info(&toppoly_info); 312 set_pxa_fb_info(&toppoly_info);