diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2011-10-17 19:36:23 +0900 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:25 -0400 |
commit | 4e0a5adf46ee7810af2e1b7e4e8c2a298652618e (patch) | |
tree | 64b60adcedd341a02a8f150ce7257e2b0eb40e0c /drivers/mmc/host/dw_mmc.h | |
parent | c43fd7746698a10aa6435d62ec28f977dd6246cc (diff) | |
download | talos-op-linux-4e0a5adf46ee7810af2e1b7e4e8c2a298652618e.tar.gz talos-op-linux-4e0a5adf46ee7810af2e1b7e4e8c2a298652618e.zip |
mmc: dw_mmc: modify DATA register offset
In dw_mmc 2.40a spec, Data register's offset is changed.
Before we used Data register offset 0x100. but if somebody uses a
2.40a controller, we must use 0x200 for Data register.
This patch adds a version-id checking point and uses SDMMC_DATA(x)
instead of SDMMC_DATA. It assumes 2.40a is the latest version.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.h')
-rw-r--r-- | drivers/mmc/host/dw_mmc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index bfa3c1cd05ac..72c071f6e001 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -14,6 +14,8 @@ #ifndef _DW_MMC_H_ #define _DW_MMC_H_ +#define DW_MMC_240A 0x240a + #define SDMMC_CTRL 0x000 #define SDMMC_PWREN 0x004 #define SDMMC_CLKDIV 0x008 @@ -51,7 +53,14 @@ #define SDMMC_IDINTEN 0x090 #define SDMMC_DSCADDR 0x094 #define SDMMC_BUFADDR 0x098 -#define SDMMC_DATA 0x100 +#define SDMMC_DATA(x) (x) + +/* + * Data offset is difference according to Version + * Lower than 2.40a : data register offest is 0x100 + */ +#define DATA_OFFSET 0x100 +#define DATA_240A_OFFSET 0x200 /* shift bit field */ #define _SBF(f, v) ((v) << (f)) @@ -130,6 +139,8 @@ #define SDMMC_IDMAC_ENABLE BIT(7) #define SDMMC_IDMAC_FB BIT(1) #define SDMMC_IDMAC_SWRESET BIT(0) +/* Version ID register define */ +#define SDMMC_GET_VERID(x) ((x) & 0xFFFF) /* Register access macros */ #define mci_readl(dev, reg) \ |