]> Zhao Yanbai Git Server - minix.git/commitdiff
arm:adapt MMC driver to also work on the AM335X platform. 92/592/3
authorKees Jongenburger <kees.jongenburger@gmail.com>
Fri, 24 May 2013 08:26:51 +0000 (10:26 +0200)
committerKees Jongenburger <kees.jongenburger@gmail.com>
Fri, 24 May 2013 13:47:04 +0000 (15:47 +0200)
Change-Id: I30e69b7bfd377d1dd2b0b458dd00ee411b060285

drivers/mmc/mmchost_mmchs.c
drivers/mmc/omap_mmc.h
etc/system.conf

index 1797febaeb3c058ef0ce08cadcc5ac5928fdedae..add21753890593fb77160eb462ca4647791b5960 100644 (file)
 
 #ifdef USE_INTR
 static int hook_id = 1;
+#ifdef DM37XX
 #define OMAP3_MMC1_IRQ      83 /* MMC/SD module 1 */
 #endif
+#ifdef AM335X
+#define OMAP3_MMC1_IRQ     64  /* MMC/SD module 1 */
+#endif
+#endif
 
 #define SANE_TIMEOUT 500000    /* 500 MS */
 /*
@@ -105,7 +110,9 @@ mmchs_init(uint32_t instance)
        if (base_address == (uint32_t) MAP_FAILED)
                panic("Unable to map MMC memory");
 
+#ifdef DM37XX
        base_address = (unsigned long) base_address - 0x100;
+#endif
 
        /* Soft reset of the controller. This section is documented in the TRM 
         */
index 02dca94ea8c7b8004ef0e60b34fd1492d6a9e0f3..9c193c6aa7c32a17164c874bd9697ffde81a3d09 100644 (file)
@@ -1,8 +1,13 @@
 ///* TODO: Rename to MMCH_0_REG_BASE and add the base address for the other items */
-//#define MMCHS1_REG_BASE 0x48060000
+#ifdef AM335X
+#define MMCHS1_REG_BASE 0x48060000
+#endif
 
 //#ifdef AM_DM37x_Multimedia_Device
+
+#ifdef DM37XX
 #define MMCHS1_REG_BASE 0x4809C000
+#endif
 //#define MMCHS2_REG_BASE 0x480B4000
 //#define MMCHS3_REG_BASE 0x480AD000
 //#endif
index 496888114cc101a9df96422a8cd41fa24533b8da..9d9e8badb1c6d92a6a7492f38ba6d46152ff8320 100644 (file)
@@ -551,7 +551,11 @@ service mmc
                PRIVCTL         #  4
                IRQCTL          # 19
        ;
-       irq     83;             # IRQ 83 allowed
+       # Interrupts allowed
+       irq     
+               64
+               83
+       ;               # IRQs allowed
 };
 
 service fb