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 /*****************************************************************************/
36 * @addtogroup qspipsu_v1_0
39 * This file contains low level access funcitons using the base address
40 * directly without an instance.
43 * MODIFICATION HISTORY:
45 * Ver Who Date Changes
46 * ----- --- -------- -----------------------------------------------.
47 * 1.0 hk 08/21/14 First release
48 * hk 03/18/15 Add DMA status register masks required.
49 * sk 04/24/15 Modified the code according to MISRAC-2012.
53 ******************************************************************************/
54 #ifndef _XQSPIPSU_HW_H_ /* prevent circular inclusions */
55 #define _XQSPIPSU_HW_H_ /* by using protection macros */
61 /***************************** Include Files *********************************/
63 #include "xil_types.h"
64 #include "xil_assert.h"
66 #include "xparameters.h"
68 /************************** Constant Definitions *****************************/
73 #define XQSPIPS_BASEADDR 0XFF0F0000U
78 #define XQSPIPSU_BASEADDR 0xFF0F0100U
79 #define XQSPIPSU_OFFSET 0x100U
82 * Register: XQSPIPS_EN_REG
84 #define XQSPIPS_EN_REG ( ( XQSPIPS_BASEADDR ) + 0X00000014U )
86 #define XQSPIPS_EN_SHIFT 0
87 #define XQSPIPS_EN_WIDTH 1
88 #define XQSPIPS_EN_MASK 0X00000001U
91 * Register: XQSPIPSU_CFG
93 #define XQSPIPSU_CFG_OFFSET 0X00000000U
95 #define XQSPIPSU_CFG_MODE_EN_SHIFT 30
96 #define XQSPIPSU_CFG_MODE_EN_WIDTH 2
97 #define XQSPIPSU_CFG_MODE_EN_MASK 0XC0000000U
98 #define XQSPIPSU_CFG_MODE_EN_DMA_MASK 0X80000000U
100 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_SHIFT 29
101 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_WIDTH 1
102 #define XQSPIPSU_CFG_GEN_FIFO_START_MODE_MASK 0X20000000U
104 #define XQSPIPSU_CFG_START_GEN_FIFO_SHIFT 28
105 #define XQSPIPSU_CFG_START_GEN_FIFO_WIDTH 1
106 #define XQSPIPSU_CFG_START_GEN_FIFO_MASK 0X10000000U
108 #define XQSPIPSU_CFG_ENDIAN_SHIFT 26
109 #define XQSPIPSU_CFG_ENDIAN_WIDTH 1
110 #define XQSPIPSU_CFG_ENDIAN_MASK 0X04000000U
112 #define XQSPIPSU_CFG_EN_POLL_TO_SHIFT 20
113 #define XQSPIPSU_CFG_EN_POLL_TO_WIDTH 1
114 #define XQSPIPSU_CFG_EN_POLL_TO_MASK 0X00100000U
116 #define XQSPIPSU_CFG_WP_HOLD_SHIFT 19
117 #define XQSPIPSU_CFG_WP_HOLD_WIDTH 1
118 #define XQSPIPSU_CFG_WP_HOLD_MASK 0X00080000U
120 #define XQSPIPSU_CFG_BAUD_RATE_DIV_SHIFT 3
121 #define XQSPIPSU_CFG_BAUD_RATE_DIV_WIDTH 3
122 #define XQSPIPSU_CFG_BAUD_RATE_DIV_MASK 0X00000038U
124 #define XQSPIPSU_CFG_CLK_PHA_SHIFT 2
125 #define XQSPIPSU_CFG_CLK_PHA_WIDTH 1
126 #define XQSPIPSU_CFG_CLK_PHA_MASK 0X00000004U
128 #define XQSPIPSU_CFG_CLK_POL_SHIFT 1
129 #define XQSPIPSU_CFG_CLK_POL_WIDTH 1
130 #define XQSPIPSU_CFG_CLK_POL_MASK 0X00000002U
133 * Register: XQSPIPSU_ISR
135 #define XQSPIPSU_ISR_OFFSET 0X00000004U
137 #define XQSPIPSU_ISR_RXEMPTY_SHIFT 11
138 #define XQSPIPSU_ISR_RXEMPTY_WIDTH 1
139 #define XQSPIPSU_ISR_RXEMPTY_MASK 0X00000800U
141 #define XQSPIPSU_ISR_GENFIFOFULL_SHIFT 10
142 #define XQSPIPSU_ISR_GENFIFOFULL_WIDTH 1
143 #define XQSPIPSU_ISR_GENFIFOFULL_MASK 0X00000400U
145 #define XQSPIPSU_ISR_GENFIFONOT_FULL_SHIFT 9
146 #define XQSPIPSU_ISR_GENFIFONOT_FULL_WIDTH 1
147 #define XQSPIPSU_ISR_GENFIFONOT_FULL_MASK 0X00000200U
149 #define XQSPIPSU_ISR_TXEMPTY_SHIFT 8
150 #define XQSPIPSU_ISR_TXEMPTY_WIDTH 1
151 #define XQSPIPSU_ISR_TXEMPTY_MASK 0X00000100U
153 #define XQSPIPSU_ISR_GENFIFOEMPTY_SHIFT 7
154 #define XQSPIPSU_ISR_GENFIFOEMPTY_WIDTH 1
155 #define XQSPIPSU_ISR_GENFIFOEMPTY_MASK 0X00000080U
157 #define XQSPIPSU_ISR_RXFULL_SHIFT 5
158 #define XQSPIPSU_ISR_RXFULL_WIDTH 1
159 #define XQSPIPSU_ISR_RXFULL_MASK 0X00000020U
161 #define XQSPIPSU_ISR_RXNEMPTY_SHIFT 4
162 #define XQSPIPSU_ISR_RXNEMPTY_WIDTH 1
163 #define XQSPIPSU_ISR_RXNEMPTY_MASK 0X00000010U
165 #define XQSPIPSU_ISR_TXFULL_SHIFT 3
166 #define XQSPIPSU_ISR_TXFULL_WIDTH 1
167 #define XQSPIPSU_ISR_TXFULL_MASK 0X00000008U
169 #define XQSPIPSU_ISR_TXNOT_FULL_SHIFT 2
170 #define XQSPIPSU_ISR_TXNOT_FULL_WIDTH 1
171 #define XQSPIPSU_ISR_TXNOT_FULL_MASK 0X00000004U
173 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_SHIFT 1
174 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_WIDTH 1
175 #define XQSPIPSU_ISR_POLL_TIME_EXPIRE_MASK 0X00000002U
177 #define XQSPIPSU_ISR_WR_TO_CLR_MASK 0X00000002U
180 * Register: XQSPIPSU_IER
182 #define XQSPIPSU_IER_OFFSET 0X00000008U
184 #define XQSPIPSU_IER_RXEMPTY_SHIFT 11
185 #define XQSPIPSU_IER_RXEMPTY_WIDTH 1
186 #define XQSPIPSU_IER_RXEMPTY_MASK 0X00000800U
188 #define XQSPIPSU_IER_GENFIFOFULL_SHIFT 10
189 #define XQSPIPSU_IER_GENFIFOFULL_WIDTH 1
190 #define XQSPIPSU_IER_GENFIFOFULL_MASK 0X00000400U
192 #define XQSPIPSU_IER_GENFIFONOT_FULL_SHIFT 9
193 #define XQSPIPSU_IER_GENFIFONOT_FULL_WIDTH 1
194 #define XQSPIPSU_IER_GENFIFONOT_FULL_MASK 0X00000200U
196 #define XQSPIPSU_IER_TXEMPTY_SHIFT 8
197 #define XQSPIPSU_IER_TXEMPTY_WIDTH 1
198 #define XQSPIPSU_IER_TXEMPTY_MASK 0X00000100U
200 #define XQSPIPSU_IER_GENFIFOEMPTY_SHIFT 7
201 #define XQSPIPSU_IER_GENFIFOEMPTY_WIDTH 1
202 #define XQSPIPSU_IER_GENFIFOEMPTY_MASK 0X00000080U
204 #define XQSPIPSU_IER_RXFULL_SHIFT 5
205 #define XQSPIPSU_IER_RXFULL_WIDTH 1
206 #define XQSPIPSU_IER_RXFULL_MASK 0X00000020U
208 #define XQSPIPSU_IER_RXNEMPTY_SHIFT 4
209 #define XQSPIPSU_IER_RXNEMPTY_WIDTH 1
210 #define XQSPIPSU_IER_RXNEMPTY_MASK 0X00000010U
212 #define XQSPIPSU_IER_TXFULL_SHIFT 3
213 #define XQSPIPSU_IER_TXFULL_WIDTH 1
214 #define XQSPIPSU_IER_TXFULL_MASK 0X00000008U
216 #define XQSPIPSU_IER_TXNOT_FULL_SHIFT 2
217 #define XQSPIPSU_IER_TXNOT_FULL_WIDTH 1
218 #define XQSPIPSU_IER_TXNOT_FULL_MASK 0X00000004U
220 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_SHIFT 1
221 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_WIDTH 1
222 #define XQSPIPSU_IER_POLL_TIME_EXPIRE_MASK 0X00000002U
225 * Register: XQSPIPSU_IDR
227 #define XQSPIPSU_IDR_OFFSET 0X0000000CU
229 #define XQSPIPSU_IDR_RXEMPTY_SHIFT 11
230 #define XQSPIPSU_IDR_RXEMPTY_WIDTH 1
231 #define XQSPIPSU_IDR_RXEMPTY_MASK 0X00000800U
233 #define XQSPIPSU_IDR_GENFIFOFULL_SHIFT 10
234 #define XQSPIPSU_IDR_GENFIFOFULL_WIDTH 1
235 #define XQSPIPSU_IDR_GENFIFOFULL_MASK 0X00000400U
237 #define XQSPIPSU_IDR_GENFIFONOT_FULL_SHIFT 9
238 #define XQSPIPSU_IDR_GENFIFONOT_FULL_WIDTH 1
239 #define XQSPIPSU_IDR_GENFIFONOT_FULL_MASK 0X00000200U
241 #define XQSPIPSU_IDR_TXEMPTY_SHIFT 8
242 #define XQSPIPSU_IDR_TXEMPTY_WIDTH 1
243 #define XQSPIPSU_IDR_TXEMPTY_MASK 0X00000100U
245 #define XQSPIPSU_IDR_GENFIFOEMPTY_SHIFT 7
246 #define XQSPIPSU_IDR_GENFIFOEMPTY_WIDTH 1
247 #define XQSPIPSU_IDR_GENFIFOEMPTY_MASK 0X00000080U
249 #define XQSPIPSU_IDR_RXFULL_SHIFT 5
250 #define XQSPIPSU_IDR_RXFULL_WIDTH 1
251 #define XQSPIPSU_IDR_RXFULL_MASK 0X00000020U
253 #define XQSPIPSU_IDR_RXNEMPTY_SHIFT 4
254 #define XQSPIPSU_IDR_RXNEMPTY_WIDTH 1
255 #define XQSPIPSU_IDR_RXNEMPTY_MASK 0X00000010U
257 #define XQSPIPSU_IDR_TXFULL_SHIFT 3
258 #define XQSPIPSU_IDR_TXFULL_WIDTH 1
259 #define XQSPIPSU_IDR_TXFULL_MASK 0X00000008U
261 #define XQSPIPSU_IDR_TXNOT_FULL_SHIFT 2
262 #define XQSPIPSU_IDR_TXNOT_FULL_WIDTH 1
263 #define XQSPIPSU_IDR_TXNOT_FULL_MASK 0X00000004U
265 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_SHIFT 1
266 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_WIDTH 1
267 #define XQSPIPSU_IDR_POLL_TIME_EXPIRE_MASK 0X00000002U
269 #define XQSPIPSU_IDR_ALL_MASK 0X0FBEU
272 * Register: XQSPIPSU_IMR
274 #define XQSPIPSU_IMR_OFFSET 0X00000010U
276 #define XQSPIPSU_IMR_RXEMPTY_SHIFT 11
277 #define XQSPIPSU_IMR_RXEMPTY_WIDTH 1
278 #define XQSPIPSU_IMR_RXEMPTY_MASK 0X00000800U
280 #define XQSPIPSU_IMR_GENFIFOFULL_SHIFT 10
281 #define XQSPIPSU_IMR_GENFIFOFULL_WIDTH 1
282 #define XQSPIPSU_IMR_GENFIFOFULL_MASK 0X00000400U
284 #define XQSPIPSU_IMR_GENFIFONOT_FULL_SHIFT 9
285 #define XQSPIPSU_IMR_GENFIFONOT_FULL_WIDTH 1
286 #define XQSPIPSU_IMR_GENFIFONOT_FULL_MASK 0X00000200U
288 #define XQSPIPSU_IMR_TXEMPTY_SHIFT 8
289 #define XQSPIPSU_IMR_TXEMPTY_WIDTH 1
290 #define XQSPIPSU_IMR_TXEMPTY_MASK 0X00000100U
292 #define XQSPIPSU_IMR_GENFIFOEMPTY_SHIFT 7
293 #define XQSPIPSU_IMR_GENFIFOEMPTY_WIDTH 1
294 #define XQSPIPSU_IMR_GENFIFOEMPTY_MASK 0X00000080U
296 #define XQSPIPSU_IMR_RXFULL_SHIFT 5
297 #define XQSPIPSU_IMR_RXFULL_WIDTH 1
298 #define XQSPIPSU_IMR_RXFULL_MASK 0X00000020U
300 #define XQSPIPSU_IMR_RXNEMPTY_SHIFT 4
301 #define XQSPIPSU_IMR_RXNEMPTY_WIDTH 1
302 #define XQSPIPSU_IMR_RXNEMPTY_MASK 0X00000010U
304 #define XQSPIPSU_IMR_TXFULL_SHIFT 3
305 #define XQSPIPSU_IMR_TXFULL_WIDTH 1
306 #define XQSPIPSU_IMR_TXFULL_MASK 0X00000008U
308 #define XQSPIPSU_IMR_TXNOT_FULL_SHIFT 2
309 #define XQSPIPSU_IMR_TXNOT_FULL_WIDTH 1
310 #define XQSPIPSU_IMR_TXNOT_FULL_MASK 0X00000004U
312 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_SHIFT 1
313 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_WIDTH 1
314 #define XQSPIPSU_IMR_POLL_TIME_EXPIRE_MASK 0X00000002U
317 * Register: XQSPIPSU_EN_REG
319 #define XQSPIPSU_EN_OFFSET 0X00000014U
321 #define XQSPIPSU_EN_SHIFT 0
322 #define XQSPIPSU_EN_WIDTH 1
323 #define XQSPIPSU_EN_MASK 0X00000001U
326 * Register: XQSPIPSU_TXD
328 #define XQSPIPSU_TXD_OFFSET 0X0000001CU
330 #define XQSPIPSU_TXD_SHIFT 0
331 #define XQSPIPSU_TXD_WIDTH 32
332 #define XQSPIPSU_TXD_MASK 0XFFFFFFFFU
334 #define XQSPIPSU_TXD_DEPTH 64
337 * Register: XQSPIPSU_RXD
339 #define XQSPIPSU_RXD_OFFSET 0X00000020U
341 #define XQSPIPSU_RXD_SHIFT 0
342 #define XQSPIPSU_RXD_WIDTH 32
343 #define XQSPIPSU_RXD_MASK 0XFFFFFFFFU
346 * Register: XQSPIPSU_TX_THRESHOLD
348 #define XQSPIPSU_TX_THRESHOLD_OFFSET 0X00000028U
350 #define XQSPIPSU_TX_FIFO_THRESHOLD_SHIFT 0
351 #define XQSPIPSU_TX_FIFO_THRESHOLD_WIDTH 6
352 #define XQSPIPSU_TX_FIFO_THRESHOLD_MASK 0X0000003FU
353 #define XQSPIPSU_TX_FIFO_THRESHOLD_RESET_VAL 0X01U
356 * Register: XQSPIPSU_RX_THRESHOLD
358 #define XQSPIPSU_RX_THRESHOLD_OFFSET 0X0000002CU
360 #define XQSPIPSU_RX_FIFO_THRESHOLD_SHIFT 0
361 #define XQSPIPSU_RX_FIFO_THRESHOLD_WIDTH 6
362 #define XQSPIPSU_RX_FIFO_THRESHOLD_MASK 0X0000003FU
363 #define XQSPIPSU_RX_FIFO_THRESHOLD_RESET_VAL 0X01U
365 #define XQSPIPSU_RXFIFO_THRESHOLD_OPT 32U
368 * Register: XQSPIPSU_GPIO
370 #define XQSPIPSU_GPIO_OFFSET 0X00000030U
372 #define XQSPIPSU_GPIO_WP_N_SHIFT 0
373 #define XQSPIPSU_GPIO_WP_N_WIDTH 1
374 #define XQSPIPSU_GPIO_WP_N_MASK 0X00000001U
377 * Register: XQSPIPSU_LPBK_DLY_ADJ
379 #define XQSPIPSU_LPBK_DLY_ADJ_OFFSET 0X00000038U
381 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_SHIFT 5
382 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_WIDTH 1
383 #define XQSPIPSU_LPBK_DLY_ADJ_USE_LPBK_MASK 0X00000020U
385 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_SHIFT 3
386 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_WIDTH 2
387 #define XQSPIPSU_LPBK_DLY_ADJ_DLY1_MASK 0X00000018U
389 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_SHIFT 0
390 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_WIDTH 3
391 #define XQSPIPSU_LPBK_DLY_ADJ_DLY0_MASK 0X00000007U
394 * Register: XQSPIPSU_GEN_FIFO
396 #define XQSPIPSU_GEN_FIFO_OFFSET 0X00000040U
398 #define XQSPIPSU_GEN_FIFO_DATA_SHIFT 0
399 #define XQSPIPSU_GEN_FIFO_DATA_WIDTH 20
400 #define XQSPIPSU_GEN_FIFO_DATA_MASK 0X000FFFFFU
403 * Register: XQSPIPSU_SEL
405 #define XQSPIPSU_SEL_OFFSET 0X00000044U
407 #define XQSPIPSU_SEL_SHIFT 0
408 #define XQSPIPSU_SEL_WIDTH 1
409 #define XQSPIPSU_SEL_MASK 0X00000001U
412 * Register: XQSPIPSU_FIFO_CTRL
414 #define XQSPIPSU_FIFO_CTRL_OFFSET 0X0000004CU
416 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_SHIFT 2
417 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_WIDTH 1
418 #define XQSPIPSU_FIFO_CTRL_RST_RX_FIFO_MASK 0X00000004U
420 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_SHIFT 1
421 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_WIDTH 1
422 #define XQSPIPSU_FIFO_CTRL_RST_TX_FIFO_MASK 0X00000002U
424 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_SHIFT 0
425 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_WIDTH 1
426 #define XQSPIPSU_FIFO_CTRL_RST_GEN_FIFO_MASK 0X00000001U
429 * Register: XQSPIPSU_GF_THRESHOLD
431 #define XQSPIPSU_GF_THRESHOLD_OFFSET 0X00000050U
433 #define XQSPIPSU_GEN_FIFO_THRESHOLD_SHIFT 0
434 #define XQSPIPSU_GEN_FIFO_THRESHOLD_WIDTH 5
435 #define XQSPIPSU_GEN_FIFO_THRESHOLD_MASK 0X0000001F
436 #define XQSPIPSU_GEN_FIFO_THRESHOLD_RESET_VAL 0X10U
439 * Register: XQSPIPSU_POLL_CFG
441 #define XQSPIPSU_POLL_CFG_OFFSET 0X00000054U
443 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_SHIFT 31
444 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_WIDTH 1
445 #define XQSPIPSU_POLL_CFG_EN_MASK_UPPER_MASK 0X80000000U
447 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_SHIFT 30
448 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_WIDTH 1
449 #define XQSPIPSU_POLL_CFG_EN_MASK_LOWER_MASK 0X40000000U
451 #define XQSPIPSU_POLL_CFG_MASK_EN_SHIFT 8
452 #define XQSPIPSU_POLL_CFG_MASK_EN_WIDTH 8
453 #define XQSPIPSU_POLL_CFG_MASK_EN_MASK 0X0000FF00U
455 #define XQSPIPSU_POLL_CFG_DATA_VALUE_SHIFT 0
456 #define XQSPIPSU_POLL_CFG_DATA_VALUE_WIDTH 8
457 #define XQSPIPSU_POLL_CFG_DATA_VALUE_MASK 0X000000FFU
460 * Register: XQSPIPSU_P_TIMEOUT
462 #define XQSPIPSU_P_TO_OFFSET 0X00000058U
464 #define XQSPIPSU_P_TO_VALUE_SHIFT 0
465 #define XQSPIPSU_P_TO_VALUE_WIDTH 32
466 #define XQSPIPSU_P_TO_VALUE_MASK 0XFFFFFFFFU
469 * Register: XQSPIPSU_XFER_STS
471 #define XQSPIPSU_XFER_STS_OFFSET 0X0000005CU
473 #define XQSPIPSU_XFER_STS_PEND_BYTES_SHIFT 0
474 #define XQSPIPSU_XFER_STS_PEND_BYTES_WIDTH 32
475 #define XQSPIPSU_XFER_STS_PEND_BYTES_MASK 0XFFFFFFFFU
478 * Register: XQSPIPSU_GF_SNAPSHOT
480 #define XQSPIPSU_GF_SNAPSHOT_OFFSET 0X00000060U
482 #define XQSPIPSU_GF_SNAPSHOT_SHIFT 0
483 #define XQSPIPSU_GF_SNAPSHOT_WIDTH 20
484 #define XQSPIPSU_GF_SNAPSHOT_MASK 0X000FFFFFU
487 * Register: XQSPIPSU_RX_COPY
489 #define XQSPIPSU_RX_COPY_OFFSET 0X00000064U
491 #define XQSPIPSU_RX_COPY_UPPER_SHIFT 8
492 #define XQSPIPSU_RX_COPY_UPPER_WIDTH 8
493 #define XQSPIPSU_RX_COPY_UPPER_MASK 0X0000FF00U
495 #define XQSPIPSU_RX_COPY_LOWER_SHIFT 0
496 #define XQSPIPSU_RX_COPY_LOWER_WIDTH 8
497 #define XQSPIPSU_RX_COPY_LOWER_MASK 0X000000FFU
500 * Register: XQSPIPSU_MOD_ID
502 #define XQSPIPSU_MOD_ID_OFFSET 0X000000FCU
504 #define XQSPIPSU_MOD_ID_SHIFT 0
505 #define XQSPIPSU_MOD_ID_WIDTH 32
506 #define XQSPIPSU_MOD_ID_MASK 0XFFFFFFFFU
509 * Register: XQSPIPSU_QSPIDMA_DST_ADDR
511 #define XQSPIPSU_QSPIDMA_DST_ADDR_OFFSET 0X00000700U
513 #define XQSPIPSU_QSPIDMA_DST_ADDR_SHIFT 2
514 #define XQSPIPSU_QSPIDMA_DST_ADDR_WIDTH 30
515 #define XQSPIPSU_QSPIDMA_DST_ADDR_MASK 0XFFFFFFFCU
518 * Register: XQSPIPSU_QSPIDMA_DST_SIZE
520 #define XQSPIPSU_QSPIDMA_DST_SIZE_OFFSET 0X00000704U
522 #define XQSPIPSU_QSPIDMA_DST_SIZE_SHIFT 2
523 #define XQSPIPSU_QSPIDMA_DST_SIZE_WIDTH 27
524 #define XQSPIPSU_QSPIDMA_DST_SIZE_MASK 0X1FFFFFFCU
527 * Register: XQSPIPSU_QSPIDMA_DST_STS
529 #define XQSPIPSU_QSPIDMA_DST_STS_OFFSET 0X00000708U
531 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_SHIFT 13
532 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_WIDTH 3
533 #define XQSPIPSU_QSPIDMA_DST_STS_DONE_CNT_MASK 0X0000E000U
535 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_SHIFT 5
536 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_WIDTH 8
537 #define XQSPIPSU_QSPIDMA_DST_STS_DST_FIFO_LEVEL_MASK 0X00001FE0U
539 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_SHIFT 1
540 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_WIDTH 4
541 #define XQSPIPSU_QSPIDMA_DST_STS_WR_OUTSTANDING_MASK 0X0000001EU
543 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_SHIFT 0
544 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_WIDTH 1
545 #define XQSPIPSU_QSPIDMA_DST_STS_BUSY_MASK 0X00000001U
547 #define XQSPIPSU_QSPIDMA_DST_STS_WTC 0xE000U
550 * Register: XQSPIPSU_QSPIDMA_DST_CTRL
552 #define XQSPIPSU_QSPIDMA_DST_CTRL_OFFSET 0X0000070CU
554 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_SHIFT 25
555 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_WIDTH 7
556 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_LVL_HIT_THRESHOLD_MASK 0XFE000000U
558 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_SHIFT 24
559 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_WIDTH 1
560 #define XQSPIPSU_QSPIDMA_DST_CTRL_APB_ERR_RESP_MASK 0X01000000U
562 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_SHIFT 23
563 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_WIDTH 1
564 #define XQSPIPSU_QSPIDMA_DST_CTRL_ENDIAN_MASK 0X00800000U
566 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_SHIFT 22
567 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_WIDTH 1
568 #define XQSPIPSU_QSPIDMA_DST_CTRL_AXI_BRST_TYPE_MASK 0X00400000U
570 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_SHIFT 10
571 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_WIDTH 12
572 #define XQSPIPSU_QSPIDMA_DST_CTRL_TO_VAL_MASK 0X003FFC00U
574 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_SHIFT 2
575 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_WIDTH 8
576 #define XQSPIPSU_QSPIDMA_DST_CTRL_FIFO_THRESHOLD_MASK 0X000003FCU
578 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_SHIFT 1
579 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_WIDTH 1
580 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_STRM_MASK 0X00000002U
582 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_SHIFT 0
583 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_WIDTH 1
584 #define XQSPIPSU_QSPIDMA_DST_CTRL_PAUSE_MEM_MASK 0X00000001U
586 #define XQSPIPSU_QSPIDMA_DST_CTRL_RESET_VAL 0x403FFA00U
589 * Register: XQSPIPSU_QSPIDMA_DST_I_STS
591 #define XQSPIPSU_QSPIDMA_DST_I_STS_OFFSET 0X00000714U
593 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_SHIFT 7
594 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_WIDTH 1
595 #define XQSPIPSU_QSPIDMA_DST_I_STS_FIFO_OF_MASK 0X00000080U
597 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_SHIFT 6
598 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_WIDTH 1
599 #define XQSPIPSU_QSPIDMA_DST_I_STS_INVALID_APB_MASK 0X00000040U
601 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_SHIFT 5
602 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_WIDTH 1
603 #define XQSPIPSU_QSPIDMA_DST_I_STS_THRESHOLD_HIT_MASK 0X00000020U
605 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_SHIFT 4
606 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_WIDTH 1
607 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_MEM_MASK 0X00000010U
609 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_SHIFT 3
610 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_WIDTH 1
611 #define XQSPIPSU_QSPIDMA_DST_I_STS_TO_STRM_MASK 0X00000008U
613 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_SHIFT 2
614 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_WIDTH 1
615 #define XQSPIPSU_QSPIDMA_DST_I_STS_AXI_BRESP_ERR_MASK 0X00000004U
617 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_SHIFT 1
618 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_WIDTH 1
619 #define XQSPIPSU_QSPIDMA_DST_I_STS_DONE_MASK 0X00000002U
621 #define XQSPIPSU_QSPIDMA_DST_INTR_ERR_MASK 0X000000FCU
622 #define XQSPIPSU_QSPIDMA_DST_INTR_ALL_MASK 0X000000FEU
625 * Register: XQSPIPSU_QSPIDMA_DST_I_EN
627 #define XQSPIPSU_QSPIDMA_DST_I_EN_OFFSET 0X00000718U
629 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_SHIFT 7
630 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_WIDTH 1
631 #define XQSPIPSU_QSPIDMA_DST_I_EN_FIFO_OF_MASK 0X00000080U
633 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_SHIFT 6
634 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_WIDTH 1
635 #define XQSPIPSU_QSPIDMA_DST_I_EN_INVALID_APB_MASK 0X00000040U
637 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_SHIFT 5
638 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_WIDTH 1
639 #define XQSPIPSU_QSPIDMA_DST_I_EN_THRESHOLD_HIT_MASK 0X00000020U
641 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_SHIFT 4
642 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_WIDTH 1
643 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_MEM_MASK 0X00000010U
645 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_SHIFT 3
646 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_WIDTH 1
647 #define XQSPIPSU_QSPIDMA_DST_I_EN_TO_STRM_MASK 0X00000008U
649 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_SHIFT 2
650 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_WIDTH 1
651 #define XQSPIPSU_QSPIDMA_DST_I_EN_AXI_BRESP_ERR_MASK 0X00000004U
653 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_SHIFT 1
654 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_WIDTH 1
655 #define XQSPIPSU_QSPIDMA_DST_I_EN_DONE_MASK 0X00000002U
658 * Register: XQSPIPSU_QSPIDMA_DST_I_DIS
660 #define XQSPIPSU_QSPIDMA_DST_I_DIS_OFFSET 0X0000071CU
662 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_SHIFT 7
663 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_WIDTH 1
664 #define XQSPIPSU_QSPIDMA_DST_I_DIS_FIFO_OF_MASK 0X00000080U
666 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_SHIFT 6
667 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_WIDTH 1
668 #define XQSPIPSU_QSPIDMA_DST_I_DIS_INVALID_APB_MASK 0X00000040U
670 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_SHIFT 5
671 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_WIDTH 1
672 #define XQSPIPSU_QSPIDMA_DST_I_DIS_THRESHOLD_HIT_MASK 0X00000020U
674 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_SHIFT 4
675 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_WIDTH 1
676 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_MEM_MASK 0X00000010U
678 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_SHIFT 3
679 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_WIDTH 1
680 #define XQSPIPSU_QSPIDMA_DST_I_DIS_TO_STRM_MASK 0X00000008U
682 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_SHIFT 2
683 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_WIDTH 1
684 #define XQSPIPSU_QSPIDMA_DST_I_DIS_AXI_BRESP_ERR_MASK 0X00000004U
686 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_SHIFT 1
687 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_WIDTH 1
688 #define XQSPIPSU_QSPIDMA_DST_I_DIS_DONE_MASK 0X00000002U
691 * Register: XQSPIPSU_QSPIDMA_DST_IMR
693 #define XQSPIPSU_QSPIDMA_DST_IMR_OFFSET 0X00000720U
695 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_SHIFT 7
696 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_WIDTH 1
697 #define XQSPIPSU_QSPIDMA_DST_IMR_FIFO_OF_MASK 0X00000080U
699 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_SHIFT 6
700 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_WIDTH 1
701 #define XQSPIPSU_QSPIDMA_DST_IMR_INVALID_APB_MASK 0X00000040U
703 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_SHIFT 5
704 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_WIDTH 1
705 #define XQSPIPSU_QSPIDMA_DST_IMR_THRESHOLD_HIT_MASK 0X00000020U
707 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_SHIFT 4
708 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_WIDTH 1
709 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_MEM_MASK 0X00000010U
711 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_SHIFT 3
712 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_WIDTH 1
713 #define XQSPIPSU_QSPIDMA_DST_IMR_TO_STRM_MASK 0X00000008U
715 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_SHIFT 2
716 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_WIDTH 1
717 #define XQSPIPSU_QSPIDMA_DST_IMR_AXI_BRESP_ERR_MASK 0X00000004U
719 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_SHIFT 1
720 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_WIDTH 1
721 #define XQSPIPSU_QSPIDMA_DST_IMR_DONE_MASK 0X00000002U
724 * Register: XQSPIPSU_QSPIDMA_DST_CTRL2
726 #define XQSPIPSU_QSPIDMA_DST_CTRL2_OFFSET 0X00000724U
728 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_SHIFT 27
729 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_WIDTH 1
730 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMASA_MASK 0X08000000U
732 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_SHIFT 24
733 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_WIDTH 3
734 #define XQSPIPSU_QSPIDMA_DST_CTRL2_AWCACHE_MASK 0X07000000U
736 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_SHIFT 22
737 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_WIDTH 1
738 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_EN_MASK 0X00400000U
740 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_SHIFT 19
741 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_WIDTH 3
742 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAB_MASK 0X00380000U
744 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_SHIFT 16
745 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_WIDTH 3
746 #define XQSPIPSU_QSPIDMA_DST_CTRL2_RAM_EMAA_MASK 0X00070000U
748 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_SHIFT 4
749 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_WIDTH 12
750 #define XQSPIPSU_QSPIDMA_DST_CTRL2_TO_PRE_MASK 0X0000FFF0U
752 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_SHIFT 0
753 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_WIDTH 4
754 #define XQSPIPSU_QSPIDMA_DST_CTRL2_MAX_OUTS_CMDS_MASK 0X0000000FU
757 * Register: XQSPIPSU_QSPIDMA_DST_ADDR_MSB
759 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_OFFSET 0X00000728U
761 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_SHIFT 0
762 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_WIDTH 12
763 #define XQSPIPSU_QSPIDMA_DST_ADDR_MSB_MASK 0X00000FFFU
766 * Register: XQSPIPSU_QSPIDMA_FUTURE_ECO
768 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_OFFSET 0X00000EFCU
770 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_SHIFT 0
771 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_WIDTH 32
772 #define XQSPIPSU_QSPIDMA_FUTURE_ECO_VAL_MASK 0XFFFFFFFFU
777 #define XQSPIPSU_GENFIFO_IMM_DATA_MASK 0xFFU
778 #define XQSPIPSU_GENFIFO_DATA_XFER 0x100U
779 #define XQSPIPSU_GENFIFO_EXP 0x200U
780 #define XQSPIPSU_GENFIFO_MODE_SPI 0x400U
781 #define XQSPIPSU_GENFIFO_MODE_DUALSPI 0x800U
782 #define XQSPIPSU_GENFIFO_MODE_QUADSPI 0xC00U
783 #define XQSPIPSU_GENFIFO_MODE_MASK 0xC00U /* And with ~MASK first */
784 #define XQSPIPSU_GENFIFO_CS_LOWER 0x1000U
785 #define XQSPIPSU_GENFIFO_CS_UPPER 0x2000U
786 #define XQSPIPSU_GENFIFO_BUS_LOWER 0x4000U
787 #define XQSPIPSU_GENFIFO_BUS_UPPER 0x8000U
788 #define XQSPIPSU_GENFIFO_BUS_BOTH 0xC000U /* inverse is no bus */
789 #define XQSPIPSU_GENFIFO_BUS_MASK 0xC000U /* And with ~MASK first */
790 #define XQSPIPSU_GENFIFO_TX 0x10000U /* inverse is zero pump */
791 #define XQSPIPSU_GENFIFO_RX 0x20000U /* inverse is RX discard */
792 #define XQSPIPSU_GENFIFO_STRIPE 0x40000U
793 #define XQSPIPSU_GENFIFO_POLL 0x80000U
795 /***************** Macros (Inline Functions) Definitions *********************/
797 #define XQspiPsu_In32 Xil_In32
798 #define XQspiPsu_Out32 Xil_Out32
800 /****************************************************************************/
804 * @param BaseAddress contains the base address of the device.
805 * @param RegOffset contains the offset from the 1st register of the
806 * device to the target register.
808 * @return The value read from the register.
810 * @note C-Style signature:
811 * u32 XQspiPsu_ReadReg(u32 BaseAddress. s32 RegOffset)
813 ******************************************************************************/
814 #define XQspiPsu_ReadReg(BaseAddress, RegOffset) XQspiPsu_In32((BaseAddress) + (RegOffset))
816 /***************************************************************************/
818 * Write to a register.
820 * @param BaseAddress contains the base address of the device.
821 * @param RegOffset contains the offset from the 1st register of the
822 * device to target register.
823 * @param RegisterValue is the value to be written to the register.
827 * @note C-Style signature:
828 * void XQspiPsu_WriteReg(u32 BaseAddress, s32 RegOffset,
831 ******************************************************************************/
832 #define XQspiPsu_WriteReg(BaseAddress, RegOffset, RegisterValue) XQspiPsu_Out32((BaseAddress) + (RegOffset), (RegisterValue))
840 #endif /* _XQSPIPSU_H_ */