From: Kees Jongenburger Date: Fri, 24 May 2013 08:26:51 +0000 (+0200) Subject: arm:adapt MMC driver to also work on the AM335X platform. X-Git-Tag: v3.3.0~960 X-Git-Url: http://zhaoyanbai.com/repos/tz-link.htm?a=commitdiff_plain;h=758c8eaf410b61c62a1fcd5e4d1a89d0e4022322;p=minix.git arm:adapt MMC driver to also work on the AM335X platform. Change-Id: I30e69b7bfd377d1dd2b0b458dd00ee411b060285 --- diff --git a/drivers/mmc/mmchost_mmchs.c b/drivers/mmc/mmchost_mmchs.c index 1797febae..add217538 100644 --- a/drivers/mmc/mmchost_mmchs.c +++ b/drivers/mmc/mmchost_mmchs.c @@ -32,8 +32,13 @@ #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 */ diff --git a/drivers/mmc/omap_mmc.h b/drivers/mmc/omap_mmc.h index 02dca94ea..9c193c6aa 100644 --- a/drivers/mmc/omap_mmc.h +++ b/drivers/mmc/omap_mmc.h @@ -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 diff --git a/etc/system.conf b/etc/system.conf index 496888114..9d9e8badb 100644 --- a/etc/system.conf +++ b/etc/system.conf @@ -551,7 +551,11 @@ service mmc PRIVCTL # 4 IRQCTL # 19 ; - irq 83; # IRQ 83 allowed + # Interrupts allowed + irq + 64 + 83 + ; # IRQs allowed }; service fb