1 /******************************************************************************
3 * Copyright (C) 2014 Xilinx, Inc. All rights reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
31 ******************************************************************************/
32 /*****************************************************************************/
37 * This file contains low level access funcitons using the base address
38 * directly without an instance.
41 * MODIFICATION HISTORY:
43 * Ver Who Date Changes
44 * ----- --- -------- -----------------------------------------------.
45 * 1.0 hk 08/21/14 First release
46 * hk 03/18/15 Add DMA status register masks required.
50 ******************************************************************************/
51 #ifndef _XQSPIPSU_HW_H_ /* prevent circular inclusions */
52 #define _XQSPIPSU_HW_H_ /* by using protection macros */
58 /***************************** Include Files *********************************/
60 #include "xil_types.h"
61 #include "xil_assert.h"
63 #include "xparameters.h"
65 /************************** Constant Definitions *****************************/
70 #define XQSPIPS_BASEADDR 0XFF0F0000
75 #define XQSPIPSU_BASEADDR 0xFF0F0100
76 #define XQSPIPSU_OFFSET 0x100
79 * Register: XQSPIPS_EN_REG
81 #define XQSPIPS_EN_REG ( ( XQSPIPS_BASEADDR ) + 0X00000014 )
83 #define XQSPIPS_EN_SHIFT 0
84 #define XQSPIPS_EN_WIDTH 1
85 #define XQSPIPS_EN_MASK 0X00000001
88 * Register: XQSPIPSU_CFG
90 #define XQSPIPSU_CFG_OFFSET 0X00000000
92 #define XQSPIPSU_CFG_MODE_EN_SHIFT 30
93 #define XQSPIPSU_CFG_MODE_EN_WIDTH 2
94 #define XQSPIPSU_CFG_MODE_EN_MASK 0XC0000000
95 #define XQSPIPSU_CFG_MODE_EN_DMA_MASK 0X80000000
97 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_SHIFT 29
98 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_WIDTH 1
99 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_MASK 0X20000000
101 #define XQSPIPSU_CFG_START_GEN_FIFO_SHIFT 28
102 #define XQSPIPSU_CFG_START_GEN_FIFO_WIDTH 1
103 #define XQSPIPSU_CFG_START_GEN_FIFO_MASK 0X10000000
105 #define XQSPIPSU_CFG_ENDIAN_SHIFT 26
106 #define XQSPIPSU_CFG_ENDIAN_WIDTH 1
107 #define XQSPIPSU_CFG_ENDIAN_MASK 0X04000000
109 #define XQSPIPSU_CFG_EN_POLL_TO_SHIFT 20
110 #define XQSPIPSU_CFG_EN_POLL_TO_WIDTH 1
111 #define XQSPIPSU_CFG_EN_POLL_TO_MASK 0X00100000
113 #define XQSPIPSU_CFG_WP_HOLD_SHIFT 19
114 #define XQSPIPSU_CFG_WP_HOLD_WIDTH 1
115 #define XQSPIPSU_CFG_WP_HOLD_MASK 0X00080000
117 #define XQSPIPSU_CFG_BAUD_RATE_DIV_SHIFT 3
118 #define XQSPIPSU_CFG_BAUD_RATE_DIV_WIDTH 3
119 #define XQSPIPSU_CFG_BAUD_RATE_DIV_MASK 0X00000038
121 #define XQSPIPSU_CFG_CLK_PHA_SHIFT 2
122 #define XQSPIPSU_CFG_CLK_PHA_WIDTH 1
123 #define XQSPIPSU_CFG_CLK_PHA_MASK 0X00000004
125 #define XQSPIPSU_CFG_CLK_POL_SHIFT 1
126 #define XQSPIPSU_CFG_CLK_POL_WIDTH 1
127 #define XQSPIPSU_CFG_CLK_POL_MASK 0X00000002
130 * Register: XQSPIPSU_ISR
132 #define XQSPIPSU_ISR_OFFSET 0X00000004
134 #define XQSPIPSU_ISR_RXEMPTY_SHIFT 11
135 #define XQSPIPSU_ISR_RXEMPTY_WIDTH 1
136 #define XQSPIPSU_ISR_RXEMPTY_MASK 0X00000800
138 #define XQSPIPSU_ISR_GENFIFOFULL_SHIFT 10
139 #define XQSPIPSU_ISR_GENFIFOFULL_WIDTH 1
140 #define XQSPIPSU_ISR_GENFIFOFULL_MASK 0X00000400
142 #define XQSPIPSU_ISR_GENFIFONOT_FULL_SHIFT 9
143 #define XQSPIPSU_ISR_GENFIFONOT_FULL_WIDTH 1
144 #define XQSPIPSU_ISR_GENFIFONOT_FULL_MASK 0X00000200
146 #define XQSPIPSU_ISR_TXEMPTY_SHIFT 8
147 #define XQSPIPSU_ISR_TXEMPTY_WIDTH 1
148 #define XQSPIPSU_ISR_TXEMPTY_MASK 0X00000100
150 #define XQSPIPSU_ISR_GENFIFOEMPTY_SHIFT 7
151 #define XQSPIPSU_ISR_GENFIFOEMPTY_WIDTH 1
152 #define XQSPIPSU_ISR_GENFIFOEMPTY_MASK 0X00000080
154 #define XQSPIPSU_ISR_RXFULL_SHIFT 5
155 #define XQSPIPSU_ISR_RXFULL_WIDTH 1
156 #define XQSPIPSU_ISR_RXFULL_MASK 0X00000020
158 #define XQSPIPSU_ISR_RXNEMPTY_SHIFT 4
159 #define XQSPIPSU_ISR_RXNEMPTY_WIDTH 1
160 #define XQSPIPSU_ISR_RXNEMPTY_MASK 0X00000010
162 #define XQSPIPSU_ISR_TXFULL_SHIFT 3
163 #define XQSPIPSU_ISR_TXFULL_WIDTH 1
164 #define XQSPIPSU_ISR_TXFULL_MASK 0X00000008
166 #define XQSPIPSU_ISR_TXNOT_FULL_SHIFT 2
167 #define XQSPIPSU_ISR_TXNOT_FULL_WIDTH 1
168 #define XQSPIPSU_ISR_TXNOT_FULL_MASK 0X00000004
170 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_SHIFT 1
171 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_WIDTH 1
172 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_MASK 0X00000002
174 #define XQSPIPSU_ISR_WR_TO_CLR_MASK 0X00000002
177 * Register: XQSPIPSU_IER
179 #define XQSPIPSU_IER_OFFSET 0X00000008
181 #define XQSPIPSU_IER_RXEMPTY_SHIFT 11
182 #define XQSPIPSU_IER_RXEMPTY_WIDTH 1
183 #define XQSPIPSU_IER_RXEMPTY_MASK 0X00000800
185 #define XQSPIPSU_IER_GENFIFOFULL_SHIFT 10
186 #define XQSPIPSU_IER_GENFIFOFULL_WIDTH 1
187 #define XQSPIPSU_IER_GENFIFOFULL_MASK 0X00000400
189 #define XQSPIPSU_IER_GENFIFONOT_FULL_SHIFT 9
190 #define XQSPIPSU_IER_GENFIFONOT_FULL_WIDTH 1
191 #define XQSPIPSU_IER_GENFIFONOT_FULL_MASK 0X00000200
193 #define XQSPIPSU_IER_TXEMPTY_SHIFT 8
194 #define XQSPIPSU_IER_TXEMPTY_WIDTH 1
195 #define XQSPIPSU_IER_TXEMPTY_MASK 0X00000100
197 #define XQSPIPSU_IER_GENFIFOEMPTY_SHIFT 7
198 #define XQSPIPSU_IER_GENFIFOEMPTY_WIDTH 1
199 #define XQSPIPSU_IER_GENFIFOEMPTY_MASK 0X00000080
201 #define XQSPIPSU_IER_RXFULL_SHIFT 5
202 #define XQSPIPSU_IER_RXFULL_WIDTH 1
203 #define XQSPIPSU_IER_RXFULL_MASK 0X00000020
205 #define XQSPIPSU_IER_RXNEMPTY_SHIFT 4
206 #define XQSPIPSU_IER_RXNEMPTY_WIDTH 1
207 #define XQSPIPSU_IER_RXNEMPTY_MASK 0X00000010
209 #define XQSPIPSU_IER_TXFULL_SHIFT 3
210 #define XQSPIPSU_IER_TXFULL_WIDTH 1
211 #define XQSPIPSU_IER_TXFULL_MASK 0X00000008
213 #define XQSPIPSU_IER_TXNOT_FULL_SHIFT 2
214 #define XQSPIPSU_IER_TXNOT_FULL_WIDTH 1
215 #define XQSPIPSU_IER_TXNOT_FULL_MASK 0X00000004
217 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_SHIFT 1
218 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_WIDTH 1
219 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_MASK 0X00000002
222 * Register: XQSPIPSU_IDR
224 #define XQSPIPSU_IDR_OFFSET 0X0000000C
226 #define XQSPIPSU_IDR_RXEMPTY_SHIFT 11
227 #define XQSPIPSU_IDR_RXEMPTY_WIDTH 1
228 #define XQSPIPSU_IDR_RXEMPTY_MASK 0X00000800
230 #define XQSPIPSU_IDR_GENFIFOFULL_SHIFT 10
231 #define XQSPIPSU_IDR_GENFIFOFULL_WIDTH 1
232 #define XQSPIPSU_IDR_GENFIFOFULL_MASK 0X00000400
234 #define XQSPIPSU_IDR_GENFIFONOT_FULL_SHIFT 9
235 #define XQSPIPSU_IDR_GENFIFONOT_FULL_WIDTH 1
236 #define XQSPIPSU_IDR_GENFIFONOT_FULL_MASK 0X00000200
238 #define XQSPIPSU_IDR_TXEMPTY_SHIFT 8
239 #define XQSPIPSU_IDR_TXEMPTY_WIDTH 1
240 #define XQSPIPSU_IDR_TXEMPTY_MASK 0X00000100
242 #define XQSPIPSU_IDR_GENFIFOEMPTY_SHIFT 7
243 #define XQSPIPSU_IDR_GENFIFOEMPTY_WIDTH 1
244 #define XQSPIPSU_IDR_GENFIFOEMPTY_MASK 0X00000080
246 #define XQSPIPSU_IDR_RXFULL_SHIFT 5
247 #define XQSPIPSU_IDR_RXFULL_WIDTH 1
248 #define XQSPIPSU_IDR_RXFULL_MASK 0X00000020
250 #define XQSPIPSU_IDR_RXNEMPTY_SHIFT 4
251 #define XQSPIPSU_IDR_RXNEMPTY_WIDTH 1
252 #define XQSPIPSU_IDR_RXNEMPTY_MASK 0X00000010
254 #define XQSPIPSU_IDR_TXFULL_SHIFT 3
255 #define XQSPIPSU_IDR_TXFULL_WIDTH 1
256 #define XQSPIPSU_IDR_TXFULL_MASK 0X00000008
258 #define XQSPIPSU_IDR_TXNOT_FULL_SHIFT 2
259 #define XQSPIPSU_IDR_TXNOT_FULL_WIDTH 1
260 #define XQSPIPSU_IDR_TXNOT_FULL_MASK 0X00000004
262 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_SHIFT 1
263 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_WIDTH 1
264 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_MASK 0X00000002
266 #define XQSPIPSU_IDR_ALL_MASK 0X0FBE
269 * Register: XQSPIPSU_IMR
271 #define XQSPIPSU_IMR_OFFSET 0X00000010
273 #define XQSPIPSU_IMR_RXEMPTY_SHIFT 11
274 #define XQSPIPSU_IMR_RXEMPTY_WIDTH 1
275 #define XQSPIPSU_IMR_RXEMPTY_MASK 0X00000800
277 #define XQSPIPSU_IMR_GENFIFOFULL_SHIFT 10
278 #define XQSPIPSU_IMR_GENFIFOFULL_WIDTH 1
279 #define XQSPIPSU_IMR_GENFIFOFULL_MASK 0X00000400
281 #define XQSPIPSU_IMR_GENFIFONOT_FULL_SHIFT 9
282 #define XQSPIPSU_IMR_GENFIFONOT_FULL_WIDTH 1
283 #define XQSPIPSU_IMR_GENFIFONOT_FULL_MASK 0X00000200
285 #define XQSPIPSU_IMR_TXEMPTY_SHIFT 8
286 #define XQSPIPSU_IMR_TXEMPTY_WIDTH 1
287 #define XQSPIPSU_IMR_TXEMPTY_MASK 0X00000100
289 #define XQSPIPSU_IMR_GENFIFOEMPTY_SHIFT 7
290 #define XQSPIPSU_IMR_GENFIFOEMPTY_WIDTH 1
291 #define XQSPIPSU_IMR_GENFIFOEMPTY_MASK 0X00000080
293 #define XQSPIPSU_IMR_RXFULL_SHIFT 5
294 #define XQSPIPSU_IMR_RXFULL_WIDTH 1
295 #define XQSPIPSU_IMR_RXFULL_MASK 0X00000020
297 #define XQSPIPSU_IMR_RXNEMPTY_SHIFT 4
298 #define XQSPIPSU_IMR_RXNEMPTY_WIDTH 1
299 #define XQSPIPSU_IMR_RXNEMPTY_MASK 0X00000010
301 #define XQSPIPSU_IMR_TXFULL_SHIFT 3
302 #define XQSPIPSU_IMR_TXFULL_WIDTH 1
303 #define XQSPIPSU_IMR_TXFULL_MASK 0X00000008
305 #define XQSPIPSU_IMR_TXNOT_FULL_SHIFT 2
306 #define XQSPIPSU_IMR_TXNOT_FULL_WIDTH 1
307 #define XQSPIPSU_IMR_TXNOT_FULL_MASK 0X00000004
309 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_SHIFT 1
310 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_WIDTH 1
311 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_MASK 0X00000002
314 * Register: XQSPIPSU_EN_REG
316 #define XQSPIPSU_EN_OFFSET 0X00000014
318 #define XQSPIPSU_EN_SHIFT 0
319 #define XQSPIPSU_EN_WIDTH 1
320 #define XQSPIPSU_EN_MASK 0X00000001
323 * Register: XQSPIPSU_TXD
325 #define XQSPIPSU_TXD_OFFSET 0X0000001C
327 #define XQSPIPSU_TXD_SHIFT 0
328 #define XQSPIPSU_TXD_WIDTH 32
329 #define XQSPIPSU_TXD_MASK 0XFFFFFFFF
331 #define XQSPIPSU_TXD_DEPTH 32
334 * Register: XQSPIPSU_RXD
336 #define XQSPIPSU_RXD_OFFSET 0X00000020
338 #define XQSPIPSU_RXD_SHIFT 0
339 #define XQSPIPSU_RXD_WIDTH 32
340 #define XQSPIPSU_RXD_MASK 0XFFFFFFFF
343 * Register: XQSPIPSU_TX_THRESHOLD
345 #define XQSPIPSU_TX_THRESHOLD_OFFSET 0X00000028
347 #define XQSPIPSU_TX_FIFO_THRESHOLD_SHIFT 0
348 #define XQSPIPSU_TX_FIFO_THRESHOLD_WIDTH 6
349 #define XQSPIPSU_TX_FIFO_THRESHOLD_MASK 0X0000003F
350 #define XQSPIPSU_TX_FIFO_THRESHOLD_RESET_VAL 0X01
353 * Register: XQSPIPSU_RX_THRESHOLD
355 #define XQSPIPSU_RX_THRESHOLD_OFFSET 0X0000002C
357 #define XQSPIPSU_RX_FIFO_THRESHOLD_SHIFT 0
358 #define XQSPIPSU_RX_FIFO_THRESHOLD_WIDTH 6
359 #define XQSPIPSU_RX_FIFO_THRESHOLD_MASK 0X0000003F
360 #define XQSPIPSU_RX_FIFO_THRESHOLD_RESET_VAL 0X01
362 #define XQSPIPSU_RXFIFO_THRESHOLD_OPT 32
365 * Register: XQSPIPSU_GPIO
367 #define XQSPIPSU_GPIO_OFFSET 0X00000030
369 #define XQSPIPSU_GPIO_WP_N_SHIFT 0
370 #define XQSPIPSU_GPIO_WP_N_WIDTH 1
371 #define XQSPIPSU_GPIO_WP_N_MASK 0X00000001
374 * Register: XQSPIPSU_LPBK_DLY_ADJ
376 #define XQSPIPSU_LPBK_DLY_ADJ_OFFSET 0X00000038
378 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_SHIFT 5
379 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_WIDTH 1
380 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_MASK 0X00000020
382 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_SHIFT 3
383 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_WIDTH 2
384 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_MASK 0X00000018
386 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_SHIFT 0
387 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_WIDTH 3
388 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_MASK 0X00000007
391 * Register: XQSPIPSU_GEN_FIFO
393 #define XQSPIPSU_GEN_FIFO_OFFSET 0X00000040
395 #define XQSPIPSU_GEN_FIFO_DATA_SHIFT 0
396 #define XQSPIPSU_GEN_FIFO_DATA_WIDTH 20
397 #define XQSPIPSU_GEN_FIFO_DATA_MASK 0X000FFFFF
400 * Register: XQSPIPSU_SEL
402 #define XQSPIPSU_SEL_OFFSET 0X00000044
404 #define XQSPIPSU_SEL_SHIFT 0
405 #define XQSPIPSU_SEL_WIDTH 1
406 #define XQSPIPSU_SEL_MASK 0X00000001
409 * Register: XQSPIPSU_FIFO_CTRL
411 #define XQSPIPSU_FIFO_CTRL_OFFSET 0X0000004C
413 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_SHIFT 2
414 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_WIDTH 1
415 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_MASK 0X00000004
417 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_SHIFT 1
418 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_WIDTH 1
419 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_MASK 0X00000002
421 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_SHIFT 0
422 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_WIDTH 1
423 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_MASK 0X00000001
426 * Register: XQSPIPSU_GF_THRESHOLD
428 #define XQSPIPSU_GF_THRESHOLD_OFFSET 0X00000050
430 #define XQSPIPSU_GEN_FIFO_THRESHOLD_SHIFT 0
431 #define XQSPIPSU_GEN_FIFO_THRESHOLD_WIDTH 5
432 #define XQSPIPSU_GEN_FIFO_THRESHOLD_MASK 0X0000001F
433 #define XQSPIPSU_GEN_FIFO_THRESHOLD_RESET_VAL 0X10
436 * Register: XQSPIPSU_POLL_CFG
438 #define XQSPIPSU_POLL_CFG_OFFSET 0X00000054
440 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_SHIFT 31
441 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_WIDTH 1
442 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_MASK 0X80000000
444 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_SHIFT 30
445 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_WIDTH 1
446 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_MASK 0X40000000
448 #define XQSPIPSU_POLL_CFG_MASK_EN_SHIFT 8
449 #define XQSPIPSU_POLL_CFG_MASK_EN_WIDTH 8
450 #define XQSPIPSU_POLL_CFG_MASK_EN_MASK 0X0000FF00
452 #define XQSPIPSU_POLL_CFG_DATA_VALUE_SHIFT 0
453 #define XQSPIPSU_POLL_CFG_DATA_VALUE_WIDTH 8
454 #define XQSPIPSU_POLL_CFG_DATA_VALUE_MASK 0X000000FF
457 * Register: XQSPIPSU_P_TIMEOUT
459 #define XQSPIPSU_P_TO_OFFSET 0X00000058
461 #define XQSPIPSU_P_TO_VALUE_SHIFT 0
462 #define XQSPIPSU_P_TO_VALUE_WIDTH 32
463 #define XQSPIPSU_P_TO_VALUE_MASK 0XFFFFFFFF
466 * Register: XQSPIPSU_XFER_STS
468 #define XQSPIPSU_XFER_STS_OFFSET 0X0000005C
470 #define XQSPIPSU_XFER_STS_PEND_BYTES_SHIFT 0
471 #define XQSPIPSU_XFER_STS_PEND_BYTES_WIDTH 32
472 #define XQSPIPSU_XFER_STS_PEND_BYTES_MASK 0XFFFFFFFF
475 * Register: XQSPIPSU_GF_SNAPSHOT
477 #define XQSPIPSU_GF_SNAPSHOT_OFFSET 0X00000060
479 #define XQSPIPSU_GF_SNAPSHOT_SHIFT 0
480 #define XQSPIPSU_GF_SNAPSHOT_WIDTH 20
481 #define XQSPIPSU_GF_SNAPSHOT_MASK 0X000FFFFF
484 * Register: XQSPIPSU_RX_COPY
486 #define XQSPIPSU_RX_COPY_OFFSET 0X00000064
488 #define XQSPIPSU_RX_COPY_UPPER_SHIFT 8
489 #define XQSPIPSU_RX_COPY_UPPER_WIDTH 8
490 #define XQSPIPSU_RX_COPY_UPPER_MASK 0X0000FF00
492 #define XQSPIPSU_RX_COPY_LOWER_SHIFT 0
493 #define XQSPIPSU_RX_COPY_LOWER_WIDTH 8
494 #define XQSPIPSU_RX_COPY_LOWER_MASK 0X000000FF
497 * Register: XQSPIPSU_MOD_ID
499 #define XQSPIPSU_MOD_ID_OFFSET 0X000000FC
501 #define XQSPIPSU_MOD_ID_SHIFT 0
502 #define XQSPIPSU_MOD_ID_WIDTH 32
503 #define XQSPIPSU_MOD_ID_MASK 0XFFFFFFFF
506 * Register: XQSPIPSU_QSPIDMA_DST_ADDR
508 #define XQSPIPSU_QSPIDMA_DST_ADDR_OFFSET 0X00000700
510 #define XQSPIPSU_QSPIDMA_DST_ADDR_SHIFT 2
511 #define XQSPIPSU_QSPIDMA_DST_ADDR_WIDTH 30
512 #define XQSPIPSU_QSPIDMA_DST_ADDR_MASK 0XFFFFFFFC
515 * Register: XQSPIPSU_QSPIDMA_DST_SIZE
517 #define XQSPIPSU_QSPIDMA_DST_SIZE_OFFSET 0X00000704
519 #define XQSPIPSU_QSPIDMA_DST_SIZE_SHIFT 2
520 #define XQSPIPSU_QSPIDMA_DST_SIZE_WIDTH 27
521 #define XQSPIPSU_QSPIDMA_DST_SIZE_MASK 0X1FFFFFFC
524 * Register: XQSPIPSU_QSPIDMA_DST_STS
526 #define XQSPIPSU_QSPIDMA_DST_STS_OFFSET 0X00000708
528 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_SHIFT 13
529 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_WIDTH 3
530 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_MASK 0X0000E000
532 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_SHIFT 5
533 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_WIDTH 8
534 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_MASK 0X00001FE0
536 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_SHIFT 1
537 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_WIDTH 4
538 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_MASK 0X0000001E
540 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_SHIFT 0
541 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_WIDTH 1
542 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_MASK 0X00000001
544 #define XQSPIPSU_QSPIDMA_DST_STS_WTC 0xE000
547 * Register: XQSPIPSU_QSPIDMA_DST_CTRL
549 #define XQSPIPSU_QSPIDMA_DST_CTRL_OFFSET 0X0000070C
551 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_SHIFT 25
552 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_WIDTH 7
553 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_MASK 0XFE000000
555 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_SHIFT 24
556 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_WIDTH 1
557 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_MASK 0X01000000
559 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_SHIFT 23
560 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_WIDTH 1
561 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_MASK 0X00800000
563 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_SHIFT 22
564 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_WIDTH 1
565 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_MASK 0X00400000
567 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_SHIFT 10
568 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_WIDTH 12
569 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_MASK 0X003FFC00
571 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_SHIFT 2
572 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_WIDTH 8
573 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_MASK 0X000003FC
575 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_SHIFT 1
576 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_WIDTH 1
577 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_MASK 0X00000002
579 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_SHIFT 0
580 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_WIDTH 1
581 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_MASK 0X00000001
583 #define XQSPIPSU_QSPIDMA_DST_CTRL_RESET_VAL 0x803FFA00
586 * Register: XQSPIPSU_QSPIDMA_DST_I_STS
588 #define XQSPIPSU_QSPIDMA_DST_I_STS_OFFSET 0X00000714
590 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_SHIFT 7
591 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_WIDTH 1
592 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_MASK 0X00000080
594 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_SHIFT 6
595 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_WIDTH 1
596 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_MASK 0X00000040
598 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_SHIFT 5
599 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_WIDTH 1
600 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_MASK 0X00000020
602 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_SHIFT 4
603 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_WIDTH 1
604 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_MASK 0X00000010
606 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_SHIFT 3
607 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_WIDTH 1
608 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_MASK 0X00000008
610 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_SHIFT 2
611 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_WIDTH 1
612 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_MASK 0X00000004
614 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_SHIFT 1
615 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_WIDTH 1
616 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_MASK 0X00000002
618 #define XQSPIPSU_QSPIDMA_DST_INTR_ERR_MASK 0X000000FC
619 #define XQSPIPSU_QSPIDMA_DST_INTR_ALL_MASK 0X000000FE
622 * Register: XQSPIPSU_QSPIDMA_DST_I_EN
624 #define XQSPIPSU_QSPIDMA_DST_I_EN_OFFSET 0X00000718
626 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_SHIFT 7
627 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_WIDTH 1
628 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_MASK 0X00000080
630 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_SHIFT 6
631 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_WIDTH 1
632 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_MASK 0X00000040
634 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_SHIFT 5
635 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_WIDTH 1
636 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_MASK 0X00000020
638 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_SHIFT 4
639 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_WIDTH 1
640 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_MASK 0X00000010
642 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_SHIFT 3
643 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_WIDTH 1
644 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_MASK 0X00000008
646 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_SHIFT 2
647 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_WIDTH 1
648 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_MASK 0X00000004
650 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_SHIFT 1
651 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_WIDTH 1
652 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_MASK 0X00000002
655 * Register: XQSPIPSU_QSPIDMA_DST_I_DIS
657 #define XQSPIPSU_QSPIDMA_DST_I_DIS_OFFSET 0X0000071C
659 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_SHIFT 7
660 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_WIDTH 1
661 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_MASK 0X00000080
663 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_SHIFT 6
664 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_WIDTH 1
665 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_MASK 0X00000040
667 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_SHIFT 5
668 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_WIDTH 1
669 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_MASK 0X00000020
671 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_SHIFT 4
672 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_WIDTH 1
673 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_MASK 0X00000010
675 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_SHIFT 3
676 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_WIDTH 1
677 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_MASK 0X00000008
679 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_SHIFT 2
680 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_WIDTH 1
681 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_MASK 0X00000004
683 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_SHIFT 1
684 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_WIDTH 1
685 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_MASK 0X00000002
688 * Register: XQSPIPSU_QSPIDMA_DST_IMR
690 #define XQSPIPSU_QSPIDMA_DST_IMR_OFFSET 0X00000720
692 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_SHIFT 7
693 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_WIDTH 1
694 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_MASK 0X00000080
696 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_SHIFT 6
697 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_WIDTH 1
698 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_MASK 0X00000040
700 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_SHIFT 5
701 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_WIDTH 1
702 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_MASK 0X00000020
704 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_SHIFT 4
705 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_WIDTH 1
706 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_MASK 0X00000010
708 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_SHIFT 3
709 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_WIDTH 1
710 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_MASK 0X00000008
712 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_SHIFT 2
713 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_WIDTH 1
714 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_MASK 0X00000004
716 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_SHIFT 1
717 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_WIDTH 1
718 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_MASK 0X00000002
721 * Register: XQSPIPSU_QSPIDMA_DST_CTRL2
723 #define XQSPIPSU_QSPIDMA_DST_CTRL2_OFFSET 0X00000724
725 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_SHIFT 27
726 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_WIDTH 1
727 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_MASK 0X08000000
729 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_SHIFT 24
730 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_WIDTH 3
731 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_MASK 0X07000000
733 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_SHIFT 22
734 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_WIDTH 1
735 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_MASK 0X00400000
737 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_SHIFT 19
738 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_WIDTH 3
739 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_MASK 0X00380000
741 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_SHIFT 16
742 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_WIDTH 3
743 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_MASK 0X00070000
745 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_SHIFT 4
746 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_WIDTH 12
747 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_MASK 0X0000FFF0
749 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_SHIFT 0
750 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_WIDTH 4
751 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_MASK 0X0000000F
754 * Register: XQSPIPSU_QSPIDMA_DST_ADDR_MSB
756 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_OFFSET 0X00000728
758 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_SHIFT 0
759 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_WIDTH 12
760 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_MASK 0X00000FFF
763 * Register: XQSPIPSU_QSPIDMA_FUTURE_ECO
765 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_OFFSET 0X00000EFC
767 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_SHIFT 0
768 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_WIDTH 32
769 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_MASK 0XFFFFFFFF
774 #define XQSPIPSU_GENFIFO_IMM_DATA_MASK 0xFF
775 #define XQSPIPSU_GENFIFO_DATA_XFER 0x100
776 #define XQSPIPSU_GENFIFO_EXP 0x200
777 #define XQSPIPSU_GENFIFO_MODE_SPI 0x400
778 #define XQSPIPSU_GENFIFO_MODE_DUALSPI 0x800
779 #define XQSPIPSU_GENFIFO_MODE_QUADSPI 0xC00
780 #define XQSPIPSU_GENFIFO_MODE_MASK 0xC00 /* And with ~MASK first */
781 #define XQSPIPSU_GENFIFO_CS_LOWER 0x1000
782 #define XQSPIPSU_GENFIFO_CS_UPPER 0x2000
783 #define XQSPIPSU_GENFIFO_BUS_LOWER 0x4000
784 #define XQSPIPSU_GENFIFO_BUS_UPPER 0x8000
785 #define XQSPIPSU_GENFIFO_BUS_BOTH 0xC000 /* inverse is no bus */
786 #define XQSPIPSU_GENFIFO_BUS_MASK 0xC000 /* And with ~MASK first */
787 #define XQSPIPSU_GENFIFO_TX 0x10000 /* inverse is zero pump */
788 #define XQSPIPSU_GENFIFO_RX 0x20000 /* inverse is RX discard */
789 #define XQSPIPSU_GENFIFO_STRIPE 0x40000
790 #define XQSPIPSU_GENFIFO_POLL 0x80000
792 /***************** Macros (Inline Functions) Definitions *********************/
794 #define XQspiPsu_In32 Xil_In32
795 #define XQspiPsu_Out32 Xil_Out32
797 /****************************************************************************/
801 * @param BaseAddress contains the base address of the device.
802 * @param RegOffset contains the offset from the 1st register of the
803 * device to the target register.
805 * @return The value read from the register.
807 * @note C-Style signature:
808 * u32 XQspiPsu_ReadReg(u32 BaseAddress. int RegOffset)
810 ******************************************************************************/
811 #define XQspiPsu_ReadReg(BaseAddress, RegOffset) XQspiPsu_In32((BaseAddress) + (RegOffset))
813 /***************************************************************************/
815 * Write to a register.
817 * @param BaseAddress contains the base address of the device.
818 * @param RegOffset contains the offset from the 1st register of the
819 * device to target register.
820 * @param RegisterValue is the value to be written to the register.
824 * @note C-Style signature:
825 * void XQspiPsu_WriteReg(u32 BaseAddress, int RegOffset,
828 ******************************************************************************/
829 #define XQspiPsu_WriteReg(BaseAddress, RegOffset, RegisterValue) XQspiPsu_Out32((BaseAddress) + (RegOffset), (RegisterValue))
837 #endif /* _XQSPIPSU_H_ */