diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2011-12-21 02:31:15 -0500 |
---|---|---|
committer | Steven Miao <realmz6@gmail.com> | 2013-05-07 06:26:18 -0400 |
commit | db527aaafbe3351e56738a971a9c57728714c0e5 (patch) | |
tree | b854ed009445075e36f09f15f77adf9ff695947c /arch/blackfin | |
parent | c83a917112ccab57044e4c8aede4c0a765c1041c (diff) |
bf609: rsi: Add bf609 rsi MMR macro and board platform data.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Steven Miao <realmz6@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/include/asm/bfin_sdh.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/bfin_sdh.h b/arch/blackfin/include/asm/bfin_sdh.h index 6a4cfe2d3367..a99957ea9e9b 100644 --- a/arch/blackfin/include/asm/bfin_sdh.h +++ b/arch/blackfin/include/asm/bfin_sdh.h | |||
@@ -24,18 +24,27 @@ struct bfin_sd_host { | |||
24 | #define CMD_INT_E (1 << 8) /* Command Interrupt */ | 24 | #define CMD_INT_E (1 << 8) /* Command Interrupt */ |
25 | #define CMD_PEND_E (1 << 9) /* Command Pending */ | 25 | #define CMD_PEND_E (1 << 9) /* Command Pending */ |
26 | #define CMD_E (1 << 10) /* Command Enable */ | 26 | #define CMD_E (1 << 10) /* Command Enable */ |
27 | #ifdef RSI_BLKSZ | ||
28 | #define CMD_CRC_CHECK_D (1 << 11) /* CRC Check is disabled */ | ||
29 | #define CMD_DATA0_BUSY (1 << 12) /* Check for Busy State on the DATA0 pin */ | ||
30 | #endif | ||
27 | 31 | ||
28 | /* SDH_PWR_CTL bitmasks */ | 32 | /* SDH_PWR_CTL bitmasks */ |
33 | #ifndef RSI_BLKSZ | ||
29 | #define PWR_ON 0x3 /* Power On */ | 34 | #define PWR_ON 0x3 /* Power On */ |
30 | #define SD_CMD_OD (1 << 6) /* Open Drain Output */ | 35 | #define SD_CMD_OD (1 << 6) /* Open Drain Output */ |
31 | #define ROD_CTL (1 << 7) /* Rod Control */ | 36 | #define ROD_CTL (1 << 7) /* Rod Control */ |
37 | #endif | ||
32 | 38 | ||
33 | /* SDH_CLK_CTL bitmasks */ | 39 | /* SDH_CLK_CTL bitmasks */ |
34 | #define CLKDIV 0xff /* MC_CLK Divisor */ | 40 | #define CLKDIV 0xff /* MC_CLK Divisor */ |
35 | #define CLK_E (1 << 8) /* MC_CLK Bus Clock Enable */ | 41 | #define CLK_E (1 << 8) /* MC_CLK Bus Clock Enable */ |
36 | #define PWR_SV_E (1 << 9) /* Power Save Enable */ | 42 | #define PWR_SV_E (1 << 9) /* Power Save Enable */ |
37 | #define CLKDIV_BYPASS (1 << 10) /* Bypass Divisor */ | 43 | #define CLKDIV_BYPASS (1 << 10) /* Bypass Divisor */ |
38 | #define WIDE_BUS (1 << 11) /* Wide Bus Mode Enable */ | 44 | #define BUS_MODE_MASK 0x1800 /* Bus Mode Mask */ |
45 | #define STD_BUS_1 0x000 /* Standard Bus 1 bit mode */ | ||
46 | #define WIDE_BUS_4 0x800 /* Wide Bus 4 bit mode */ | ||
47 | #define BYTE_BUS_8 0x1000 /* Byte Bus 8 bit mode */ | ||
39 | 48 | ||
40 | /* SDH_RESP_CMD bitmasks */ | 49 | /* SDH_RESP_CMD bitmasks */ |
41 | #define RESP_CMD 0x3f /* Response Command */ | 50 | #define RESP_CMD 0x3f /* Response Command */ |
@@ -45,7 +54,13 @@ struct bfin_sd_host { | |||
45 | #define DTX_DIR (1 << 1) /* Data Transfer Direction */ | 54 | #define DTX_DIR (1 << 1) /* Data Transfer Direction */ |
46 | #define DTX_MODE (1 << 2) /* Data Transfer Mode */ | 55 | #define DTX_MODE (1 << 2) /* Data Transfer Mode */ |
47 | #define DTX_DMA_E (1 << 3) /* Data Transfer DMA Enable */ | 56 | #define DTX_DMA_E (1 << 3) /* Data Transfer DMA Enable */ |
57 | #ifndef RSI_BLKSZ | ||
48 | #define DTX_BLK_LGTH (0xf << 4) /* Data Transfer Block Length */ | 58 | #define DTX_BLK_LGTH (0xf << 4) /* Data Transfer Block Length */ |
59 | #else | ||
60 | |||
61 | /* Bit masks for SDH_BLK_SIZE */ | ||
62 | #define DTX_BLK_LGTH 0x1fff /* Data Transfer Block Length */ | ||
63 | #endif | ||
49 | 64 | ||
50 | /* SDH_STATUS bitmasks */ | 65 | /* SDH_STATUS bitmasks */ |
51 | #define CMD_CRC_FAIL (1 << 0) /* CMD CRC Fail */ | 66 | #define CMD_CRC_FAIL (1 << 0) /* CMD CRC Fail */ |
@@ -114,10 +129,14 @@ struct bfin_sd_host { | |||
114 | /* SDH_E_STATUS bitmasks */ | 129 | /* SDH_E_STATUS bitmasks */ |
115 | #define SDIO_INT_DET (1 << 1) /* SDIO Int Detected */ | 130 | #define SDIO_INT_DET (1 << 1) /* SDIO Int Detected */ |
116 | #define SD_CARD_DET (1 << 4) /* SD Card Detect */ | 131 | #define SD_CARD_DET (1 << 4) /* SD Card Detect */ |
132 | #define SD_CARD_BUSYMODE (1 << 31) /* Card is in Busy mode */ | ||
133 | #define SD_CARD_SLPMODE (1 << 30) /* Card in Sleep Mode */ | ||
134 | #define SD_CARD_READY (1 << 17) /* Card Ready */ | ||
117 | 135 | ||
118 | /* SDH_E_MASK bitmasks */ | 136 | /* SDH_E_MASK bitmasks */ |
119 | #define SDIO_MSK (1 << 1) /* Mask SDIO Int Detected */ | 137 | #define SDIO_MSK (1 << 1) /* Mask SDIO Int Detected */ |
120 | #define SCD_MSK (1 << 6) /* Mask Card Detect */ | 138 | #define SCD_MSK (1 << 4) /* Mask Card Detect */ |
139 | #define CARD_READY_MSK (1 << 16) /* Mask Card Ready */ | ||
121 | 140 | ||
122 | /* SDH_CFG bitmasks */ | 141 | /* SDH_CFG bitmasks */ |
123 | #define CLKS_EN (1 << 0) /* Clocks Enable */ | 142 | #define CLKS_EN (1 << 0) /* Clocks Enable */ |
@@ -126,7 +145,15 @@ struct bfin_sd_host { | |||
126 | #define SD_RST (1 << 4) /* SDMMC Reset */ | 145 | #define SD_RST (1 << 4) /* SDMMC Reset */ |
127 | #define PUP_SDDAT (1 << 5) /* Pull-up SD_DAT */ | 146 | #define PUP_SDDAT (1 << 5) /* Pull-up SD_DAT */ |
128 | #define PUP_SDDAT3 (1 << 6) /* Pull-up SD_DAT3 */ | 147 | #define PUP_SDDAT3 (1 << 6) /* Pull-up SD_DAT3 */ |
148 | #ifndef RSI_BLKSZ | ||
129 | #define PD_SDDAT3 (1 << 7) /* Pull-down SD_DAT3 */ | 149 | #define PD_SDDAT3 (1 << 7) /* Pull-down SD_DAT3 */ |
150 | #else | ||
151 | #define PWR_ON 0x600 /* Power On */ | ||
152 | #define SD_CMD_OD (1 << 11) /* Open Drain Output */ | ||
153 | #define BOOT_EN (1 << 12) /* Boot Enable */ | ||
154 | #define BOOT_MODE (1 << 13) /* Alternate Boot Mode */ | ||
155 | #define BOOT_ACK_EN (1 << 14) /* Boot ACK is expected */ | ||
156 | #endif | ||
130 | 157 | ||
131 | /* SDH_RD_WAIT_EN bitmasks */ | 158 | /* SDH_RD_WAIT_EN bitmasks */ |
132 | #define RWR (1 << 0) /* Read Wait Request */ | 159 | #define RWR (1 << 0) /* Read Wait Request */ |