diff options
Diffstat (limited to 'drivers/mmc/host/dw_mmc.h')
| -rw-r--r-- | drivers/mmc/host/dw_mmc.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index 027d37735394..72c071f6e001 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #ifndef _DW_MMC_H_ | 14 | #ifndef _DW_MMC_H_ |
| 15 | #define _DW_MMC_H_ | 15 | #define _DW_MMC_H_ |
| 16 | 16 | ||
| 17 | #define DW_MMC_240A 0x240a | ||
| 18 | |||
| 17 | #define SDMMC_CTRL 0x000 | 19 | #define SDMMC_CTRL 0x000 |
| 18 | #define SDMMC_PWREN 0x004 | 20 | #define SDMMC_PWREN 0x004 |
| 19 | #define SDMMC_CLKDIV 0x008 | 21 | #define SDMMC_CLKDIV 0x008 |
| @@ -51,7 +53,14 @@ | |||
| 51 | #define SDMMC_IDINTEN 0x090 | 53 | #define SDMMC_IDINTEN 0x090 |
| 52 | #define SDMMC_DSCADDR 0x094 | 54 | #define SDMMC_DSCADDR 0x094 |
| 53 | #define SDMMC_BUFADDR 0x098 | 55 | #define SDMMC_BUFADDR 0x098 |
| 54 | #define SDMMC_DATA 0x100 | 56 | #define SDMMC_DATA(x) (x) |
| 57 | |||
| 58 | /* | ||
| 59 | * Data offset is difference according to Version | ||
| 60 | * Lower than 2.40a : data register offest is 0x100 | ||
| 61 | */ | ||
| 62 | #define DATA_OFFSET 0x100 | ||
| 63 | #define DATA_240A_OFFSET 0x200 | ||
| 55 | 64 | ||
| 56 | /* shift bit field */ | 65 | /* shift bit field */ |
| 57 | #define _SBF(f, v) ((v) << (f)) | 66 | #define _SBF(f, v) ((v) << (f)) |
| @@ -82,7 +91,7 @@ | |||
| 82 | #define SDMMC_CTYPE_4BIT BIT(0) | 91 | #define SDMMC_CTYPE_4BIT BIT(0) |
| 83 | #define SDMMC_CTYPE_1BIT 0 | 92 | #define SDMMC_CTYPE_1BIT 0 |
| 84 | /* Interrupt status & mask register defines */ | 93 | /* Interrupt status & mask register defines */ |
| 85 | #define SDMMC_INT_SDIO BIT(16) | 94 | #define SDMMC_INT_SDIO(n) BIT(16 + (n)) |
| 86 | #define SDMMC_INT_EBE BIT(15) | 95 | #define SDMMC_INT_EBE BIT(15) |
| 87 | #define SDMMC_INT_ACD BIT(14) | 96 | #define SDMMC_INT_ACD BIT(14) |
| 88 | #define SDMMC_INT_SBE BIT(13) | 97 | #define SDMMC_INT_SBE BIT(13) |
| @@ -130,6 +139,8 @@ | |||
| 130 | #define SDMMC_IDMAC_ENABLE BIT(7) | 139 | #define SDMMC_IDMAC_ENABLE BIT(7) |
| 131 | #define SDMMC_IDMAC_FB BIT(1) | 140 | #define SDMMC_IDMAC_FB BIT(1) |
| 132 | #define SDMMC_IDMAC_SWRESET BIT(0) | 141 | #define SDMMC_IDMAC_SWRESET BIT(0) |
| 142 | /* Version ID register define */ | ||
| 143 | #define SDMMC_GET_VERID(x) ((x) & 0xFFFF) | ||
| 133 | 144 | ||
| 134 | /* Register access macros */ | 145 | /* Register access macros */ |
| 135 | #define mci_readl(dev, reg) \ | 146 | #define mci_readl(dev, reg) \ |
