arm:adapt MMC driver to also work on the AM335X platform.

Change-Id: I30e69b7bfd377d1dd2b0b458dd00ee411b060285
This commit is contained in:
Kees Jongenburger 2013-05-24 10:26:51 +02:00
parent 0748a95f88
commit 758c8eaf41
3 changed files with 18 additions and 2 deletions

View File

@ -32,8 +32,13 @@
#ifdef USE_INTR #ifdef USE_INTR
static int hook_id = 1; static int hook_id = 1;
#ifdef DM37XX
#define OMAP3_MMC1_IRQ 83 /* MMC/SD module 1 */ #define OMAP3_MMC1_IRQ 83 /* MMC/SD module 1 */
#endif #endif
#ifdef AM335X
#define OMAP3_MMC1_IRQ 64 /* MMC/SD module 1 */
#endif
#endif
#define SANE_TIMEOUT 500000 /* 500 MS */ #define SANE_TIMEOUT 500000 /* 500 MS */
/* /*
@ -105,7 +110,9 @@ mmchs_init(uint32_t instance)
if (base_address == (uint32_t) MAP_FAILED) if (base_address == (uint32_t) MAP_FAILED)
panic("Unable to map MMC memory"); panic("Unable to map MMC memory");
#ifdef DM37XX
base_address = (unsigned long) base_address - 0x100; base_address = (unsigned long) base_address - 0x100;
#endif
/* Soft reset of the controller. This section is documented in the TRM /* Soft reset of the controller. This section is documented in the TRM
*/ */

View File

@ -1,8 +1,13 @@
///* TODO: Rename to MMCH_0_REG_BASE and add the base address for the other items */ ///* 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 AM_DM37x_Multimedia_Device
#ifdef DM37XX
#define MMCHS1_REG_BASE 0x4809C000 #define MMCHS1_REG_BASE 0x4809C000
#endif
//#define MMCHS2_REG_BASE 0x480B4000 //#define MMCHS2_REG_BASE 0x480B4000
//#define MMCHS3_REG_BASE 0x480AD000 //#define MMCHS3_REG_BASE 0x480AD000
//#endif //#endif

View File

@ -551,7 +551,11 @@ service mmc
PRIVCTL # 4 PRIVCTL # 4
IRQCTL # 19 IRQCTL # 19
; ;
irq 83; # IRQ 83 allowed # Interrupts allowed
irq
64
83
; # IRQs allowed
}; };
service fb service fb