]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/asm-arm/arch-mx28/regs-ssp.h
applied patches from Freescale and Ka-Ro
[karo-tx-uboot.git] / include / asm-arm / arch-mx28 / regs-ssp.h
1 /*
2  * Freescale SSP Register Definitions
3  *
4  * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19  *
20  * This file is created by xml file. Don't Edit it.
21  *
22  * Xml Revision: 4.0
23  * Template revision: 26195
24  */
25
26 #ifndef __ARCH_ARM___SSP_H
27 #define __ARCH_ARM___SSP_H
28
29
30 #define HW_SSP_CTRL0    (0x00000000)
31 #define HW_SSP_CTRL0_SET        (0x00000004)
32 #define HW_SSP_CTRL0_CLR        (0x00000008)
33 #define HW_SSP_CTRL0_TOG        (0x0000000c)
34
35 #define BM_SSP_CTRL0_SFTRST     0x80000000
36 #define BM_SSP_CTRL0_CLKGATE    0x40000000
37 #define BM_SSP_CTRL0_RUN        0x20000000
38 #define BM_SSP_CTRL0_SDIO_IRQ_CHECK     0x10000000
39 #define BM_SSP_CTRL0_LOCK_CS    0x08000000
40 #define BM_SSP_CTRL0_IGNORE_CRC 0x04000000
41 #define BM_SSP_CTRL0_READ       0x02000000
42 #define BM_SSP_CTRL0_DATA_XFER  0x01000000
43 #define BP_SSP_CTRL0_BUS_WIDTH  22
44 #define BM_SSP_CTRL0_BUS_WIDTH  0x00C00000
45 #define BF_SSP_CTRL0_BUS_WIDTH(v)  \
46                 (((v) << 22) & BM_SSP_CTRL0_BUS_WIDTH)
47 #define BV_SSP_CTRL0_BUS_WIDTH__ONE_BIT   0x0
48 #define BV_SSP_CTRL0_BUS_WIDTH__FOUR_BIT  0x1
49 #define BV_SSP_CTRL0_BUS_WIDTH__EIGHT_BIT 0x2
50 #define BM_SSP_CTRL0_WAIT_FOR_IRQ       0x00200000
51 #define BM_SSP_CTRL0_WAIT_FOR_CMD       0x00100000
52 #define BM_SSP_CTRL0_LONG_RESP  0x00080000
53 #define BM_SSP_CTRL0_CHECK_RESP 0x00040000
54 #define BM_SSP_CTRL0_GET_RESP   0x00020000
55 #define BM_SSP_CTRL0_ENABLE     0x00010000
56 #define BP_SSP_CTRL0_RSVD0      0
57 #define BM_SSP_CTRL0_RSVD0      0x0000FFFF
58 #define BF_SSP_CTRL0_RSVD0(v)  \
59                 (((v) << 0) & BM_SSP_CTRL0_RSVD0)
60
61 #define HW_SSP_CMD0     (0x00000010)
62 #define HW_SSP_CMD0_SET (0x00000014)
63 #define HW_SSP_CMD0_CLR (0x00000018)
64 #define HW_SSP_CMD0_TOG (0x0000001c)
65
66 #define BP_SSP_CMD0_RSVD0       27
67 #define BM_SSP_CMD0_RSVD0       0xF8000000
68 #define BF_SSP_CMD0_RSVD0(v) \
69                 (((v) << 27) & BM_SSP_CMD0_RSVD0)
70 #define BM_SSP_CMD0_SOFT_TERMINATE      0x04000000
71 #define BM_SSP_CMD0_DBL_DATA_RATE_EN    0x02000000
72 #define BM_SSP_CMD0_PRIM_BOOT_OP_EN     0x01000000
73 #define BM_SSP_CMD0_BOOT_ACK_EN 0x00800000
74 #define BM_SSP_CMD0_SLOW_CLKING_EN      0x00400000
75 #define BM_SSP_CMD0_CONT_CLKING_EN      0x00200000
76 #define BM_SSP_CMD0_APPEND_8CYC 0x00100000
77 #define BP_SSP_CMD0_RSVD1       8
78 #define BM_SSP_CMD0_RSVD1       0x000FFF00
79 #define BF_SSP_CMD0_RSVD1(v)  \
80                 (((v) << 8) & BM_SSP_CMD0_RSVD1)
81 #define BP_SSP_CMD0_CMD 0
82 #define BM_SSP_CMD0_CMD 0x000000FF
83 #define BF_SSP_CMD0_CMD(v)  \
84                 (((v) << 0) & BM_SSP_CMD0_CMD)
85 #define BV_SSP_CMD0_CMD__MMC_GO_IDLE_STATE        0x00
86 #define BV_SSP_CMD0_CMD__MMC_SEND_OP_COND         0x01
87 #define BV_SSP_CMD0_CMD__MMC_ALL_SEND_CID         0x02
88 #define BV_SSP_CMD0_CMD__MMC_SET_RELATIVE_ADDR    0x03
89 #define BV_SSP_CMD0_CMD__MMC_SET_DSR              0x04
90 #define BV_SSP_CMD0_CMD__MMC_RESERVED_5           0x05
91 #define BV_SSP_CMD0_CMD__MMC_SWITCH               0x06
92 #define BV_SSP_CMD0_CMD__MMC_SELECT_DESELECT_CARD 0x07
93 #define BV_SSP_CMD0_CMD__MMC_SEND_EXT_CSD         0x08
94 #define BV_SSP_CMD0_CMD__MMC_SEND_CSD             0x09
95 #define BV_SSP_CMD0_CMD__MMC_SEND_CID             0x0A
96 #define BV_SSP_CMD0_CMD__MMC_READ_DAT_UNTIL_STOP  0x0B
97 #define BV_SSP_CMD0_CMD__MMC_STOP_TRANSMISSION    0x0C
98 #define BV_SSP_CMD0_CMD__MMC_SEND_STATUS          0x0D
99 #define BV_SSP_CMD0_CMD__MMC_BUSTEST_R            0x0E
100 #define BV_SSP_CMD0_CMD__MMC_GO_INACTIVE_STATE    0x0F
101 #define BV_SSP_CMD0_CMD__MMC_SET_BLOCKLEN         0x10
102 #define BV_SSP_CMD0_CMD__MMC_READ_SINGLE_BLOCK    0x11
103 #define BV_SSP_CMD0_CMD__MMC_READ_MULTIPLE_BLOCK  0x12
104 #define BV_SSP_CMD0_CMD__MMC_BUSTEST_W            0x13
105 #define BV_SSP_CMD0_CMD__MMC_WRITE_DAT_UNTIL_STOP 0x14
106 #define BV_SSP_CMD0_CMD__MMC_SET_BLOCK_COUNT      0x17
107 #define BV_SSP_CMD0_CMD__MMC_WRITE_BLOCK          0x18
108 #define BV_SSP_CMD0_CMD__MMC_WRITE_MULTIPLE_BLOCK 0x19
109 #define BV_SSP_CMD0_CMD__MMC_PROGRAM_CID          0x1A
110 #define BV_SSP_CMD0_CMD__MMC_PROGRAM_CSD          0x1B
111 #define BV_SSP_CMD0_CMD__MMC_SET_WRITE_PROT       0x1C
112 #define BV_SSP_CMD0_CMD__MMC_CLR_WRITE_PROT       0x1D
113 #define BV_SSP_CMD0_CMD__MMC_SEND_WRITE_PROT      0x1E
114 #define BV_SSP_CMD0_CMD__MMC_ERASE_GROUP_START    0x23
115 #define BV_SSP_CMD0_CMD__MMC_ERASE_GROUP_END      0x24
116 #define BV_SSP_CMD0_CMD__MMC_ERASE                0x26
117 #define BV_SSP_CMD0_CMD__MMC_FAST_IO              0x27
118 #define BV_SSP_CMD0_CMD__MMC_GO_IRQ_STATE         0x28
119 #define BV_SSP_CMD0_CMD__MMC_LOCK_UNLOCK          0x2A
120 #define BV_SSP_CMD0_CMD__MMC_APP_CMD              0x37
121 #define BV_SSP_CMD0_CMD__MMC_GEN_CMD              0x38
122 #define BV_SSP_CMD0_CMD__SD_GO_IDLE_STATE         0x00
123 #define BV_SSP_CMD0_CMD__SD_ALL_SEND_CID          0x02
124 #define BV_SSP_CMD0_CMD__SD_SEND_RELATIVE_ADDR    0x03
125 #define BV_SSP_CMD0_CMD__SD_SET_DSR               0x04
126 #define BV_SSP_CMD0_CMD__SD_IO_SEND_OP_COND       0x05
127 #define BV_SSP_CMD0_CMD__SD_SELECT_DESELECT_CARD  0x07
128 #define BV_SSP_CMD0_CMD__SD_SEND_CSD              0x09
129 #define BV_SSP_CMD0_CMD__SD_SEND_CID              0x0A
130 #define BV_SSP_CMD0_CMD__SD_STOP_TRANSMISSION     0x0C
131 #define BV_SSP_CMD0_CMD__SD_SEND_STATUS           0x0D
132 #define BV_SSP_CMD0_CMD__SD_GO_INACTIVE_STATE     0x0F
133 #define BV_SSP_CMD0_CMD__SD_SET_BLOCKLEN          0x10
134 #define BV_SSP_CMD0_CMD__SD_READ_SINGLE_BLOCK     0x11
135 #define BV_SSP_CMD0_CMD__SD_READ_MULTIPLE_BLOCK   0x12
136 #define BV_SSP_CMD0_CMD__SD_WRITE_BLOCK           0x18
137 #define BV_SSP_CMD0_CMD__SD_WRITE_MULTIPLE_BLOCK  0x19
138 #define BV_SSP_CMD0_CMD__SD_PROGRAM_CSD           0x1B
139 #define BV_SSP_CMD0_CMD__SD_SET_WRITE_PROT        0x1C
140 #define BV_SSP_CMD0_CMD__SD_CLR_WRITE_PROT        0x1D
141 #define BV_SSP_CMD0_CMD__SD_SEND_WRITE_PROT       0x1E
142 #define BV_SSP_CMD0_CMD__SD_ERASE_WR_BLK_START    0x20
143 #define BV_SSP_CMD0_CMD__SD_ERASE_WR_BLK_END      0x21
144 #define BV_SSP_CMD0_CMD__SD_ERASE_GROUP_START     0x23
145 #define BV_SSP_CMD0_CMD__SD_ERASE_GROUP_END       0x24
146 #define BV_SSP_CMD0_CMD__SD_ERASE                 0x26
147 #define BV_SSP_CMD0_CMD__SD_LOCK_UNLOCK           0x2A
148 #define BV_SSP_CMD0_CMD__SD_IO_RW_DIRECT          0x34
149 #define BV_SSP_CMD0_CMD__SD_IO_RW_EXTENDED        0x35
150 #define BV_SSP_CMD0_CMD__SD_APP_CMD               0x37
151 #define BV_SSP_CMD0_CMD__SD_GEN_CMD               0x38
152
153 #define HW_SSP_CMD1     (0x00000020)
154
155 #define BP_SSP_CMD1_CMD_ARG     0
156 #define BM_SSP_CMD1_CMD_ARG     0xFFFFFFFF
157 #define BF_SSP_CMD1_CMD_ARG(v)  (v)
158
159 #define HW_SSP_XFER_SIZE        (0x00000030)
160
161 #define BP_SSP_XFER_SIZE_XFER_COUNT     0
162 #define BM_SSP_XFER_SIZE_XFER_COUNT     0xFFFFFFFF
163 #define BF_SSP_XFER_SIZE_XFER_COUNT(v)  (v)
164
165 #define HW_SSP_BLOCK_SIZE       (0x00000040)
166
167 #define BP_SSP_BLOCK_SIZE_RSVD0 28
168 #define BM_SSP_BLOCK_SIZE_RSVD0 0xF0000000
169 #define BF_SSP_BLOCK_SIZE_RSVD0(v) \
170                 (((v) << 28) & BM_SSP_BLOCK_SIZE_RSVD0)
171 #define BP_SSP_BLOCK_SIZE_BLOCK_COUNT   4
172 #define BM_SSP_BLOCK_SIZE_BLOCK_COUNT   0x0FFFFFF0
173 #define BF_SSP_BLOCK_SIZE_BLOCK_COUNT(v)  \
174                 (((v) << 4) & BM_SSP_BLOCK_SIZE_BLOCK_COUNT)
175 #define BP_SSP_BLOCK_SIZE_BLOCK_SIZE    0
176 #define BM_SSP_BLOCK_SIZE_BLOCK_SIZE    0x0000000F
177 #define BF_SSP_BLOCK_SIZE_BLOCK_SIZE(v)  \
178                 (((v) << 0) & BM_SSP_BLOCK_SIZE_BLOCK_SIZE)
179
180 #define HW_SSP_COMPREF  (0x00000050)
181
182 #define BP_SSP_COMPREF_REFERENCE        0
183 #define BM_SSP_COMPREF_REFERENCE        0xFFFFFFFF
184 #define BF_SSP_COMPREF_REFERENCE(v)     (v)
185
186 #define HW_SSP_COMPMASK (0x00000060)
187
188 #define BP_SSP_COMPMASK_MASK    0
189 #define BM_SSP_COMPMASK_MASK    0xFFFFFFFF
190 #define BF_SSP_COMPMASK_MASK(v) (v)
191
192 #define HW_SSP_TIMING   (0x00000070)
193
194 #define BP_SSP_TIMING_TIMEOUT   16
195 #define BM_SSP_TIMING_TIMEOUT   0xFFFF0000
196 #define BF_SSP_TIMING_TIMEOUT(v) \
197                 (((v) << 16) & BM_SSP_TIMING_TIMEOUT)
198 #define BP_SSP_TIMING_CLOCK_DIVIDE      8
199 #define BM_SSP_TIMING_CLOCK_DIVIDE      0x0000FF00
200 #define BF_SSP_TIMING_CLOCK_DIVIDE(v)  \
201                 (((v) << 8) & BM_SSP_TIMING_CLOCK_DIVIDE)
202 #define BP_SSP_TIMING_CLOCK_RATE        0
203 #define BM_SSP_TIMING_CLOCK_RATE        0x000000FF
204 #define BF_SSP_TIMING_CLOCK_RATE(v)  \
205                 (((v) << 0) & BM_SSP_TIMING_CLOCK_RATE)
206
207 #define HW_SSP_CTRL1    (0x00000080)
208 #define HW_SSP_CTRL1_SET        (0x00000084)
209 #define HW_SSP_CTRL1_CLR        (0x00000088)
210 #define HW_SSP_CTRL1_TOG        (0x0000008c)
211
212 #define BM_SSP_CTRL1_SDIO_IRQ   0x80000000
213 #define BM_SSP_CTRL1_SDIO_IRQ_EN        0x40000000
214 #define BM_SSP_CTRL1_RESP_ERR_IRQ       0x20000000
215 #define BM_SSP_CTRL1_RESP_ERR_IRQ_EN    0x10000000
216 #define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ   0x08000000
217 #define BM_SSP_CTRL1_RESP_TIMEOUT_IRQ_EN        0x04000000
218 #define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ   0x02000000
219 #define BM_SSP_CTRL1_DATA_TIMEOUT_IRQ_EN        0x01000000
220 #define BM_SSP_CTRL1_DATA_CRC_IRQ       0x00800000
221 #define BM_SSP_CTRL1_DATA_CRC_IRQ_EN    0x00400000
222 #define BM_SSP_CTRL1_FIFO_UNDERRUN_IRQ  0x00200000
223 #define BM_SSP_CTRL1_FIFO_UNDERRUN_EN   0x00100000
224 #define BM_SSP_CTRL1_CEATA_CCS_ERR_IRQ  0x00080000
225 #define BM_SSP_CTRL1_CEATA_CCS_ERR_IRQ_EN       0x00040000
226 #define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ   0x00020000
227 #define BM_SSP_CTRL1_RECV_TIMEOUT_IRQ_EN        0x00010000
228 #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ   0x00008000
229 #define BM_SSP_CTRL1_FIFO_OVERRUN_IRQ_EN        0x00004000
230 #define BM_SSP_CTRL1_DMA_ENABLE 0x00002000
231 #define BM_SSP_CTRL1_CEATA_CCS_ERR_EN   0x00001000
232 #define BM_SSP_CTRL1_SLAVE_OUT_DISABLE  0x00000800
233 #define BM_SSP_CTRL1_PHASE      0x00000400
234 #define BM_SSP_CTRL1_POLARITY   0x00000200
235 #define BM_SSP_CTRL1_SLAVE_MODE 0x00000100
236 #define BP_SSP_CTRL1_WORD_LENGTH        4
237 #define BM_SSP_CTRL1_WORD_LENGTH        0x000000F0
238 #define BF_SSP_CTRL1_WORD_LENGTH(v)  \
239                 (((v) << 4) & BM_SSP_CTRL1_WORD_LENGTH)
240 #define BV_SSP_CTRL1_WORD_LENGTH__RESERVED0    0x0
241 #define BV_SSP_CTRL1_WORD_LENGTH__RESERVED1    0x1
242 #define BV_SSP_CTRL1_WORD_LENGTH__RESERVED2    0x2
243 #define BV_SSP_CTRL1_WORD_LENGTH__FOUR_BITS    0x3
244 #define BV_SSP_CTRL1_WORD_LENGTH__EIGHT_BITS   0x7
245 #define BV_SSP_CTRL1_WORD_LENGTH__SIXTEEN_BITS 0xF
246 #define BP_SSP_CTRL1_SSP_MODE   0
247 #define BM_SSP_CTRL1_SSP_MODE   0x0000000F
248 #define BF_SSP_CTRL1_SSP_MODE(v)  \
249                 (((v) << 0) & BM_SSP_CTRL1_SSP_MODE)
250 #define BV_SSP_CTRL1_SSP_MODE__SPI    0x0
251 #define BV_SSP_CTRL1_SSP_MODE__SSI    0x1
252 #define BV_SSP_CTRL1_SSP_MODE__SD_MMC 0x3
253 #define BV_SSP_CTRL1_SSP_MODE__MS     0x4
254
255 #define HW_SSP_DATA     (0x00000090)
256
257 #define BP_SSP_DATA_DATA        0
258 #define BM_SSP_DATA_DATA        0xFFFFFFFF
259 #define BF_SSP_DATA_DATA(v)     (v)
260
261 #define HW_SSP_SDRESP0  (0x000000a0)
262
263 #define BP_SSP_SDRESP0_RESP0    0
264 #define BM_SSP_SDRESP0_RESP0    0xFFFFFFFF
265 #define BF_SSP_SDRESP0_RESP0(v) (v)
266
267 #define HW_SSP_SDRESP1  (0x000000b0)
268
269 #define BP_SSP_SDRESP1_RESP1    0
270 #define BM_SSP_SDRESP1_RESP1    0xFFFFFFFF
271 #define BF_SSP_SDRESP1_RESP1(v) (v)
272
273 #define HW_SSP_SDRESP2  (0x000000c0)
274
275 #define BP_SSP_SDRESP2_RESP2    0
276 #define BM_SSP_SDRESP2_RESP2    0xFFFFFFFF
277 #define BF_SSP_SDRESP2_RESP2(v) (v)
278
279 #define HW_SSP_SDRESP3  (0x000000d0)
280
281 #define BP_SSP_SDRESP3_RESP3    0
282 #define BM_SSP_SDRESP3_RESP3    0xFFFFFFFF
283 #define BF_SSP_SDRESP3_RESP3(v) (v)
284
285 #define HW_SSP_DDR_CTRL (0x000000e0)
286
287 #define BP_SSP_DDR_CTRL_DMA_BURST_TYPE  30
288 #define BM_SSP_DDR_CTRL_DMA_BURST_TYPE  0xC0000000
289 #define BF_SSP_DDR_CTRL_DMA_BURST_TYPE(v) \
290                 (((v) << 30) & BM_SSP_DDR_CTRL_DMA_BURST_TYPE)
291 #define BP_SSP_DDR_CTRL_RSVD0   2
292 #define BM_SSP_DDR_CTRL_RSVD0   0x3FFFFFFC
293 #define BF_SSP_DDR_CTRL_RSVD0(v)  \
294                 (((v) << 2) & BM_SSP_DDR_CTRL_RSVD0)
295 #define BM_SSP_DDR_CTRL_NIBBLE_POS      0x00000002
296 #define BM_SSP_DDR_CTRL_TXCLK_DELAY_TYPE        0x00000001
297
298 #define HW_SSP_DLL_CTRL (0x000000f0)
299
300 #define BP_SSP_DLL_CTRL_REF_UPDATE_INT  28
301 #define BM_SSP_DLL_CTRL_REF_UPDATE_INT  0xF0000000
302 #define BF_SSP_DLL_CTRL_REF_UPDATE_INT(v) \
303                 (((v) << 28) & BM_SSP_DLL_CTRL_REF_UPDATE_INT)
304 #define BP_SSP_DLL_CTRL_SLV_UPDATE_INT  20
305 #define BM_SSP_DLL_CTRL_SLV_UPDATE_INT  0x0FF00000
306 #define BF_SSP_DLL_CTRL_SLV_UPDATE_INT(v)  \
307                 (((v) << 20) & BM_SSP_DLL_CTRL_SLV_UPDATE_INT)
308 #define BP_SSP_DLL_CTRL_RSVD1   16
309 #define BM_SSP_DLL_CTRL_RSVD1   0x000F0000
310 #define BF_SSP_DLL_CTRL_RSVD1(v)  \
311                 (((v) << 16) & BM_SSP_DLL_CTRL_RSVD1)
312 #define BP_SSP_DLL_CTRL_SLV_OVERRIDE_VAL        10
313 #define BM_SSP_DLL_CTRL_SLV_OVERRIDE_VAL        0x0000FC00
314 #define BF_SSP_DLL_CTRL_SLV_OVERRIDE_VAL(v)  \
315                 (((v) << 10) & BM_SSP_DLL_CTRL_SLV_OVERRIDE_VAL)
316 #define BM_SSP_DLL_CTRL_SLV_OVERRIDE    0x00000200
317 #define BM_SSP_DLL_CTRL_RSVD0   0x00000100
318 #define BM_SSP_DLL_CTRL_GATE_UPDATE     0x00000080
319 #define BP_SSP_DLL_CTRL_SLV_DLY_TARGET  3
320 #define BM_SSP_DLL_CTRL_SLV_DLY_TARGET  0x00000078
321 #define BF_SSP_DLL_CTRL_SLV_DLY_TARGET(v)  \
322                 (((v) << 3) & BM_SSP_DLL_CTRL_SLV_DLY_TARGET)
323 #define BM_SSP_DLL_CTRL_SLV_FORCE_UPD   0x00000004
324 #define BM_SSP_DLL_CTRL_RESET   0x00000002
325 #define BM_SSP_DLL_CTRL_ENABLE  0x00000001
326
327 #define HW_SSP_STATUS   (0x00000100)
328
329 #define BM_SSP_STATUS_PRESENT   0x80000000
330 #define BM_SSP_STATUS_MS_PRESENT        0x40000000
331 #define BM_SSP_STATUS_SD_PRESENT        0x20000000
332 #define BM_SSP_STATUS_CARD_DETECT       0x10000000
333 #define BP_SSP_STATUS_RSVD3     23
334 #define BM_SSP_STATUS_RSVD3     0x0F800000
335 #define BF_SSP_STATUS_RSVD3(v)  \
336                 (((v) << 23) & BM_SSP_STATUS_RSVD3)
337 #define BM_SSP_STATUS_DMABURST  0x00400000
338 #define BM_SSP_STATUS_DMASENSE  0x00200000
339 #define BM_SSP_STATUS_DMATERM   0x00100000
340 #define BM_SSP_STATUS_DMAREQ    0x00080000
341 #define BM_SSP_STATUS_DMAEND    0x00040000
342 #define BM_SSP_STATUS_SDIO_IRQ  0x00020000
343 #define BM_SSP_STATUS_RESP_CRC_ERR      0x00010000
344 #define BM_SSP_STATUS_RESP_ERR  0x00008000
345 #define BM_SSP_STATUS_RESP_TIMEOUT      0x00004000
346 #define BM_SSP_STATUS_DATA_CRC_ERR      0x00002000
347 #define BM_SSP_STATUS_TIMEOUT   0x00001000
348 #define BM_SSP_STATUS_RECV_TIMEOUT_STAT 0x00000800
349 #define BM_SSP_STATUS_CEATA_CCS_ERR     0x00000400
350 #define BM_SSP_STATUS_FIFO_OVRFLW       0x00000200
351 #define BM_SSP_STATUS_FIFO_FULL 0x00000100
352 #define BP_SSP_STATUS_RSVD1     6
353 #define BM_SSP_STATUS_RSVD1     0x000000C0
354 #define BF_SSP_STATUS_RSVD1(v)  \
355                 (((v) << 6) & BM_SSP_STATUS_RSVD1)
356 #define BM_SSP_STATUS_FIFO_EMPTY        0x00000020
357 #define BM_SSP_STATUS_FIFO_UNDRFLW      0x00000010
358 #define BM_SSP_STATUS_CMD_BUSY  0x00000008
359 #define BM_SSP_STATUS_DATA_BUSY 0x00000004
360 #define BM_SSP_STATUS_RSVD0     0x00000002
361 #define BM_SSP_STATUS_BUSY      0x00000001
362
363 #define HW_SSP_DLL_STS  (0x00000110)
364
365 #define BP_SSP_DLL_STS_RSVD0    14
366 #define BM_SSP_DLL_STS_RSVD0    0xFFFFC000
367 #define BF_SSP_DLL_STS_RSVD0(v) \
368                 (((v) << 14) & BM_SSP_DLL_STS_RSVD0)
369 #define BP_SSP_DLL_STS_REF_SEL  8
370 #define BM_SSP_DLL_STS_REF_SEL  0x00003F00
371 #define BF_SSP_DLL_STS_REF_SEL(v)  \
372                 (((v) << 8) & BM_SSP_DLL_STS_REF_SEL)
373 #define BP_SSP_DLL_STS_SLV_SEL  2
374 #define BM_SSP_DLL_STS_SLV_SEL  0x000000FC
375 #define BF_SSP_DLL_STS_SLV_SEL(v)  \
376                 (((v) << 2) & BM_SSP_DLL_STS_SLV_SEL)
377 #define BM_SSP_DLL_STS_REF_LOCK 0x00000002
378 #define BM_SSP_DLL_STS_SLV_LOCK 0x00000001
379
380 #define HW_SSP_DEBUG    (0x00000120)
381
382 #define BP_SSP_DEBUG_DATACRC_ERR        28
383 #define BM_SSP_DEBUG_DATACRC_ERR        0xF0000000
384 #define BF_SSP_DEBUG_DATACRC_ERR(v) \
385                 (((v) << 28) & BM_SSP_DEBUG_DATACRC_ERR)
386 #define BM_SSP_DEBUG_DATA_STALL 0x08000000
387 #define BP_SSP_DEBUG_DAT_SM     24
388 #define BM_SSP_DEBUG_DAT_SM     0x07000000
389 #define BF_SSP_DEBUG_DAT_SM(v)  \
390                 (((v) << 24) & BM_SSP_DEBUG_DAT_SM)
391 #define BV_SSP_DEBUG_DAT_SM__DSM_IDLE 0x0
392 #define BV_SSP_DEBUG_DAT_SM__DSM_WORD 0x2
393 #define BV_SSP_DEBUG_DAT_SM__DSM_CRC1 0x3
394 #define BV_SSP_DEBUG_DAT_SM__DSM_CRC2 0x4
395 #define BV_SSP_DEBUG_DAT_SM__DSM_END  0x5
396 #define BP_SSP_DEBUG_MSTK_SM    20
397 #define BM_SSP_DEBUG_MSTK_SM    0x00F00000
398 #define BF_SSP_DEBUG_MSTK_SM(v)  \
399                 (((v) << 20) & BM_SSP_DEBUG_MSTK_SM)
400 #define BV_SSP_DEBUG_MSTK_SM__MSTK_IDLE  0x0
401 #define BV_SSP_DEBUG_MSTK_SM__MSTK_CKON  0x1
402 #define BV_SSP_DEBUG_MSTK_SM__MSTK_BS1   0x2
403 #define BV_SSP_DEBUG_MSTK_SM__MSTK_TPC   0x3
404 #define BV_SSP_DEBUG_MSTK_SM__MSTK_BS2   0x4
405 #define BV_SSP_DEBUG_MSTK_SM__MSTK_HDSHK 0x5
406 #define BV_SSP_DEBUG_MSTK_SM__MSTK_BS3   0x6
407 #define BV_SSP_DEBUG_MSTK_SM__MSTK_RW    0x7
408 #define BV_SSP_DEBUG_MSTK_SM__MSTK_CRC1  0x8
409 #define BV_SSP_DEBUG_MSTK_SM__MSTK_CRC2  0x9
410 #define BV_SSP_DEBUG_MSTK_SM__MSTK_BS0   0xA
411 #define BV_SSP_DEBUG_MSTK_SM__MSTK_END1  0xB
412 #define BV_SSP_DEBUG_MSTK_SM__MSTK_END2W 0xC
413 #define BV_SSP_DEBUG_MSTK_SM__MSTK_END2R 0xD
414 #define BV_SSP_DEBUG_MSTK_SM__MSTK_DONE  0xE
415 #define BM_SSP_DEBUG_CMD_OE     0x00080000
416 #define BP_SSP_DEBUG_DMA_SM     16
417 #define BM_SSP_DEBUG_DMA_SM     0x00070000
418 #define BF_SSP_DEBUG_DMA_SM(v)  \
419                 (((v) << 16) & BM_SSP_DEBUG_DMA_SM)
420 #define BV_SSP_DEBUG_DMA_SM__DMA_IDLE   0x0
421 #define BV_SSP_DEBUG_DMA_SM__DMA_DMAREQ 0x1
422 #define BV_SSP_DEBUG_DMA_SM__DMA_DMAACK 0x2
423 #define BV_SSP_DEBUG_DMA_SM__DMA_STALL  0x3
424 #define BV_SSP_DEBUG_DMA_SM__DMA_BUSY   0x4
425 #define BV_SSP_DEBUG_DMA_SM__DMA_DONE   0x5
426 #define BV_SSP_DEBUG_DMA_SM__DMA_COUNT  0x6
427 #define BP_SSP_DEBUG_MMC_SM     12
428 #define BM_SSP_DEBUG_MMC_SM     0x0000F000
429 #define BF_SSP_DEBUG_MMC_SM(v)  \
430                 (((v) << 12) & BM_SSP_DEBUG_MMC_SM)
431 #define BV_SSP_DEBUG_MMC_SM__MMC_IDLE 0x0
432 #define BV_SSP_DEBUG_MMC_SM__MMC_CMD  0x1
433 #define BV_SSP_DEBUG_MMC_SM__MMC_TRC  0x2
434 #define BV_SSP_DEBUG_MMC_SM__MMC_RESP 0x3
435 #define BV_SSP_DEBUG_MMC_SM__MMC_RPRX 0x4
436 #define BV_SSP_DEBUG_MMC_SM__MMC_TX   0x5
437 #define BV_SSP_DEBUG_MMC_SM__MMC_CTOK 0x6
438 #define BV_SSP_DEBUG_MMC_SM__MMC_RX   0x7
439 #define BV_SSP_DEBUG_MMC_SM__MMC_CCS  0x8
440 #define BV_SSP_DEBUG_MMC_SM__MMC_PUP  0x9
441 #define BV_SSP_DEBUG_MMC_SM__MMC_WAIT 0xA
442 #define BP_SSP_DEBUG_CMD_SM     10
443 #define BM_SSP_DEBUG_CMD_SM     0x00000C00
444 #define BF_SSP_DEBUG_CMD_SM(v)  \
445                 (((v) << 10) & BM_SSP_DEBUG_CMD_SM)
446 #define BV_SSP_DEBUG_CMD_SM__CSM_IDLE  0x0
447 #define BV_SSP_DEBUG_CMD_SM__CSM_INDEX 0x1
448 #define BV_SSP_DEBUG_CMD_SM__CSM_ARG   0x2
449 #define BV_SSP_DEBUG_CMD_SM__CSM_CRC   0x3
450 #define BM_SSP_DEBUG_SSP_CMD    0x00000200
451 #define BM_SSP_DEBUG_SSP_RESP   0x00000100
452 #define BP_SSP_DEBUG_SSP_RXD    0
453 #define BM_SSP_DEBUG_SSP_RXD    0x000000FF
454 #define BF_SSP_DEBUG_SSP_RXD(v)  \
455                 (((v) << 0) & BM_SSP_DEBUG_SSP_RXD)
456
457 #define HW_SSP_VERSION  (0x00000130)
458
459 #define BP_SSP_VERSION_MAJOR    24
460 #define BM_SSP_VERSION_MAJOR    0xFF000000
461 #define BF_SSP_VERSION_MAJOR(v) \
462                 (((v) << 24) & BM_SSP_VERSION_MAJOR)
463 #define BP_SSP_VERSION_MINOR    16
464 #define BM_SSP_VERSION_MINOR    0x00FF0000
465 #define BF_SSP_VERSION_MINOR(v)  \
466                 (((v) << 16) & BM_SSP_VERSION_MINOR)
467 #define BP_SSP_VERSION_STEP     0
468 #define BM_SSP_VERSION_STEP     0x0000FFFF
469 #define BF_SSP_VERSION_STEP(v)  \
470                 (((v) << 0) & BM_SSP_VERSION_STEP)
471 #endif /* __ARCH_ARM___SSP_H */