1 /******************************************************************************
3 * Copyright (C) 2002 - 2015 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 * @addtogroup common_status_codes Xilinx® software status codes
39 * The xstatus.h file contains the Xilinx® software status codes.These codes are
40 * used throughout the Xilinx device drivers.
43 ******************************************************************************/
45 #ifndef XSTATUS_H /* prevent circular inclusions */
46 #define XSTATUS_H /* by using protection macros */
52 /***************************** Include Files *********************************/
54 #include "xil_types.h"
55 #include "xil_assert.h"
57 /************************** Constant Definitions *****************************/
59 /*********************** Common statuses 0 - 500 *****************************/
61 @name Common Status Codes for All Device Drivers
64 #define XST_SUCCESS 0L
65 #define XST_FAILURE 1L
66 #define XST_DEVICE_NOT_FOUND 2L
67 #define XST_DEVICE_BLOCK_NOT_FOUND 3L
68 #define XST_INVALID_VERSION 4L
69 #define XST_DEVICE_IS_STARTED 5L
70 #define XST_DEVICE_IS_STOPPED 6L
71 #define XST_FIFO_ERROR 7L /*!< An error occurred during an
72 operation with a FIFO such as
73 an underrun or overrun, this
74 error requires the device to
76 #define XST_RESET_ERROR 8L /*!< An error occurred which requires
77 the device to be reset */
78 #define XST_DMA_ERROR 9L /*!< A DMA error occurred, this error
79 typically requires the device
80 using the DMA to be reset */
81 #define XST_NOT_POLLED 10L /*!< The device is not configured for
82 polled mode operation */
83 #define XST_FIFO_NO_ROOM 11L /*!< A FIFO did not have room to put
84 the specified data into */
85 #define XST_BUFFER_TOO_SMALL 12L /*!< The buffer is not large enough
86 to hold the expected data */
87 #define XST_NO_DATA 13L /*!< There was no data available */
88 #define XST_REGISTER_ERROR 14L /*!< A register did not contain the
90 #define XST_INVALID_PARAM 15L /*!< An invalid parameter was passed
92 #define XST_NOT_SGDMA 16L /*!< The device is not configured for
93 scatter-gather DMA operation */
94 #define XST_LOOPBACK_ERROR 17L /*!< A loopback test failed */
95 #define XST_NO_CALLBACK 18L /*!< A callback has not yet been
97 #define XST_NO_FEATURE 19L /*!< Device is not configured with
98 the requested feature */
99 #define XST_NOT_INTERRUPT 20L /*!< Device is not configured for
100 interrupt mode operation */
101 #define XST_DEVICE_BUSY 21L /*!< Device is busy */
102 #define XST_ERROR_COUNT_MAX 22L /*!< The error counters of a device
104 #define XST_IS_STARTED 23L /*!< Used when part of device is
107 #define XST_IS_STOPPED 24L /*!< Used when part of device is
110 #define XST_DATA_LOST 26L /*!< Driver defined error */
111 #define XST_RECV_ERROR 27L /*!< Generic receive error */
112 #define XST_SEND_ERROR 28L /*!< Generic transmit error */
113 #define XST_NOT_ENABLED 29L /*!< A requested service is not
114 available because it has not
117 /***************** Utility Component statuses 401 - 500 *********************/
119 @name Utility Component Status Codes 401 - 500
122 #define XST_MEMTEST_FAILED 401L /*!< Memory test failed */
125 /***************** Common Components statuses 501 - 1000 *********************/
127 @name Packet Fifo Status Codes 501 - 510
130 /********************* Packet Fifo statuses 501 - 510 ************************/
132 #define XST_PFIFO_LACK_OF_DATA 501L /*!< Not enough data in FIFO */
133 #define XST_PFIFO_NO_ROOM 502L /*!< Not enough room in FIFO */
134 #define XST_PFIFO_BAD_REG_VALUE 503L /*!< Self test, a register value
135 was invalid after reset */
136 #define XST_PFIFO_ERROR 504L /*!< Generic packet FIFO error */
137 #define XST_PFIFO_DEADLOCK 505L /*!< Packet FIFO is reporting
138 * empty and full simultaneously
142 @name DMA Status Codes 511 - 530
145 /************************** DMA statuses 511 - 530 ***************************/
147 #define XST_DMA_TRANSFER_ERROR 511L /*!< Self test, DMA transfer
149 #define XST_DMA_RESET_REGISTER_ERROR 512L /*!< Self test, a register value
150 was invalid after reset */
151 #define XST_DMA_SG_LIST_EMPTY 513L /*!< Scatter gather list contains
152 no buffer descriptors ready
154 #define XST_DMA_SG_IS_STARTED 514L /*!< Scatter gather not stopped */
155 #define XST_DMA_SG_IS_STOPPED 515L /*!< Scatter gather not running */
156 #define XST_DMA_SG_LIST_FULL 517L /*!< All the buffer desciptors of
157 the scatter gather list are
159 #define XST_DMA_SG_BD_LOCKED 518L /*!< The scatter gather buffer
160 descriptor which is to be
161 copied over in the scatter
163 #define XST_DMA_SG_NOTHING_TO_COMMIT 519L /*!< No buffer descriptors have been
164 put into the scatter gather
165 list to be commited */
166 #define XST_DMA_SG_COUNT_EXCEEDED 521L /*!< The packet count threshold
167 specified was larger than the
168 total # of buffer descriptors
169 in the scatter gather list */
170 #define XST_DMA_SG_LIST_EXISTS 522L /*!< The scatter gather list has
171 already been created */
172 #define XST_DMA_SG_NO_LIST 523L /*!< No scatter gather list has
174 #define XST_DMA_SG_BD_NOT_COMMITTED 524L /*!< The buffer descriptor which was
175 being started was not committed
177 #define XST_DMA_SG_NO_DATA 525L /*!< The buffer descriptor to start
178 has already been used by the
179 hardware so it can't be reused
181 #define XST_DMA_SG_LIST_ERROR 526L /*!< General purpose list access
183 #define XST_DMA_BD_ERROR 527L /*!< General buffer descriptor
187 @name IPIF Status Codes Codes 531 - 550
190 /************************** IPIF statuses 531 - 550 ***************************/
192 #define XST_IPIF_REG_WIDTH_ERROR 531L /*!< An invalid register width
193 was passed into the function */
194 #define XST_IPIF_RESET_REGISTER_ERROR 532L /*!< The value of a register at
195 reset was not valid */
196 #define XST_IPIF_DEVICE_STATUS_ERROR 533L /*!< A write to the device interrupt
197 status register did not read
199 #define XST_IPIF_DEVICE_ACK_ERROR 534L /*!< The device interrupt status
200 register did not reset when
202 #define XST_IPIF_DEVICE_ENABLE_ERROR 535L /*!< The device interrupt enable
203 register was not updated when
204 other registers changed */
205 #define XST_IPIF_IP_STATUS_ERROR 536L /*!< A write to the IP interrupt
206 status register did not read
208 #define XST_IPIF_IP_ACK_ERROR 537L /*!< The IP interrupt status register
209 did not reset when acked */
210 #define XST_IPIF_IP_ENABLE_ERROR 538L /*!< IP interrupt enable register was
211 not updated correctly when other
213 #define XST_IPIF_DEVICE_PENDING_ERROR 539L /*!< The device interrupt pending
214 register did not indicate the
216 #define XST_IPIF_DEVICE_ID_ERROR 540L /*!< The device interrupt ID register
217 did not indicate the expected
219 #define XST_IPIF_ERROR 541L /*!< Generic ipif error */
222 /****************** Device specific statuses 1001 - 4095 *********************/
224 @name Ethernet Status Codes 1001 - 1050
227 /********************* Ethernet statuses 1001 - 1050 *************************/
229 #define XST_EMAC_MEMORY_SIZE_ERROR 1001L /*!< Memory space is not big enough
230 * to hold the minimum number of
231 * buffers or descriptors */
232 #define XST_EMAC_MEMORY_ALLOC_ERROR 1002L /*!< Memory allocation failed */
233 #define XST_EMAC_MII_READ_ERROR 1003L /*!< MII read error */
234 #define XST_EMAC_MII_BUSY 1004L /*!< An MII operation is in progress */
235 #define XST_EMAC_OUT_OF_BUFFERS 1005L /*!< Driver is out of buffers */
236 #define XST_EMAC_PARSE_ERROR 1006L /*!< Invalid driver init string */
237 #define XST_EMAC_COLLISION_ERROR 1007L /*!< Excess deferral or late
238 * collision on polled send */
241 @name UART Status Codes 1051 - 1075
244 /*********************** UART statuses 1051 - 1075 ***************************/
247 #define XST_UART_INIT_ERROR 1051L
248 #define XST_UART_START_ERROR 1052L
249 #define XST_UART_CONFIG_ERROR 1053L
250 #define XST_UART_TEST_FAIL 1054L
251 #define XST_UART_BAUD_ERROR 1055L
252 #define XST_UART_BAUD_RANGE 1056L
256 @name IIC Status Codes 1076 - 1100
259 /************************ IIC statuses 1076 - 1100 ***************************/
261 #define XST_IIC_SELFTEST_FAILED 1076 /*!< self test failed */
262 #define XST_IIC_BUS_BUSY 1077 /*!< bus found busy */
263 #define XST_IIC_GENERAL_CALL_ADDRESS 1078 /*!< mastersend attempted with */
264 /* general call address */
265 #define XST_IIC_STAND_REG_RESET_ERROR 1079 /*!< A non parameterizable reg */
266 /* value after reset not valid */
267 #define XST_IIC_TX_FIFO_REG_RESET_ERROR 1080 /*!< Tx fifo included in design */
268 /* value after reset not valid */
269 #define XST_IIC_RX_FIFO_REG_RESET_ERROR 1081 /*!< Rx fifo included in design */
270 /* value after reset not valid */
271 #define XST_IIC_TBA_REG_RESET_ERROR 1082 /*!< 10 bit addr incl in design */
272 /* value after reset not valid */
273 #define XST_IIC_CR_READBACK_ERROR 1083 /*!< Read of the control register */
274 /* didn't return value written */
275 #define XST_IIC_DTR_READBACK_ERROR 1084 /*!< Read of the data Tx reg */
276 /* didn't return value written */
277 #define XST_IIC_DRR_READBACK_ERROR 1085 /*!< Read of the data Receive reg */
278 /* didn't return value written */
279 #define XST_IIC_ADR_READBACK_ERROR 1086 /*!< Read of the data Tx reg */
280 /* didn't return value written */
281 #define XST_IIC_TBA_READBACK_ERROR 1087 /*!< Read of the 10 bit addr reg */
282 /* didn't return written value */
283 #define XST_IIC_NOT_SLAVE 1088 /*!< The device isn't a slave */
286 @name ATMC Status Codes 1101 - 1125
289 /*********************** ATMC statuses 1101 - 1125 ***************************/
291 #define XST_ATMC_ERROR_COUNT_MAX 1101L /*!< the error counters in the ATM
292 controller hit the max value
293 which requires the statistics
297 @name Flash Status Codes 1126 - 1150
300 /*********************** Flash statuses 1126 - 1150 **************************/
302 #define XST_FLASH_BUSY 1126L /*!< Flash is erasing or programming
304 #define XST_FLASH_READY 1127L /*!< Flash is ready for commands */
305 #define XST_FLASH_ERROR 1128L /*!< Flash had detected an internal
306 error. Use XFlash_DeviceControl
307 to retrieve device specific codes
309 #define XST_FLASH_ERASE_SUSPENDED 1129L /*!< Flash is in suspended erase state
311 #define XST_FLASH_WRITE_SUSPENDED 1130L /*!< Flash is in suspended write state
313 #define XST_FLASH_PART_NOT_SUPPORTED 1131L /*!< Flash type not supported by
315 #define XST_FLASH_NOT_SUPPORTED 1132L /*!< Operation not supported */
316 #define XST_FLASH_TOO_MANY_REGIONS 1133L /*!< Too many erase regions */
317 #define XST_FLASH_TIMEOUT_ERROR 1134L /*!< Programming or erase operation
318 aborted due to a timeout */
319 #define XST_FLASH_ADDRESS_ERROR 1135L /*!< Accessed flash outside its
321 #define XST_FLASH_ALIGNMENT_ERROR 1136L /*!< Write alignment error */
322 #define XST_FLASH_BLOCKING_CALL_ERROR 1137L /*!< Couldn't return immediately from
323 write/erase function with
324 XFL_NON_BLOCKING_WRITE/ERASE
326 #define XST_FLASH_CFI_QUERY_ERROR 1138L /*!< Failed to query the device */
329 @name SPI Status Codes 1151 - 1175
332 /*********************** SPI statuses 1151 - 1175 ****************************/
334 #define XST_SPI_MODE_FAULT 1151 /*!< master was selected as slave */
335 #define XST_SPI_TRANSFER_DONE 1152 /*!< data transfer is complete */
336 #define XST_SPI_TRANSMIT_UNDERRUN 1153 /*!< slave underruns transmit register */
337 #define XST_SPI_RECEIVE_OVERRUN 1154 /*!< device overruns receive register */
338 #define XST_SPI_NO_SLAVE 1155 /*!< no slave has been selected yet */
339 #define XST_SPI_TOO_MANY_SLAVES 1156 /*!< more than one slave is being
341 #define XST_SPI_NOT_MASTER 1157 /*!< operation is valid only as master */
342 #define XST_SPI_SLAVE_ONLY 1158 /*!< device is configured as slave-only
344 #define XST_SPI_SLAVE_MODE_FAULT 1159 /*!< slave was selected while disabled */
345 #define XST_SPI_SLAVE_MODE 1160 /*!< device has been addressed as slave */
346 #define XST_SPI_RECEIVE_NOT_EMPTY 1161 /*!< device received data in slave mode */
348 #define XST_SPI_COMMAND_ERROR 1162 /*!< unrecognised command - qspi only */
349 #define XST_SPI_POLL_DONE 1163 /*!< controller completed polling the
353 @name OPB Arbiter Status Codes 1176 - 1200
356 /********************** OPB Arbiter statuses 1176 - 1200 *********************/
358 #define XST_OPBARB_INVALID_PRIORITY 1176 /*!< the priority registers have either
359 * one master assigned to two or more
360 * priorities, or one master not
361 * assigned to any priority
363 #define XST_OPBARB_NOT_SUSPENDED 1177 /*!< an attempt was made to modify the
364 * priority levels without first
365 * suspending the use of priority
368 #define XST_OPBARB_PARK_NOT_ENABLED 1178 /*!< bus parking by id was enabled but
369 * bus parking was not enabled
371 #define XST_OPBARB_NOT_FIXED_PRIORITY 1179 /*!< the arbiter must be in fixed
372 * priority mode to allow the
373 * priorities to be changed
377 @name INTC Status Codes 1201 - 1225
380 /************************ Intc statuses 1201 - 1225 **************************/
382 #define XST_INTC_FAIL_SELFTEST 1201 /*!< self test failed */
383 #define XST_INTC_CONNECT_ERROR 1202 /*!< interrupt already in use */
386 @name TmrCtr Status Codes 1226 - 1250
389 /********************** TmrCtr statuses 1226 - 1250 **************************/
391 #define XST_TMRCTR_TIMER_FAILED 1226 /*!< self test failed */
394 @name WdtTb Status Codes 1251 - 1275
397 /********************** WdtTb statuses 1251 - 1275 ***************************/
399 #define XST_WDTTB_TIMER_FAILED 1251L
402 @name PlbArb status Codes 1276 - 1300
405 /********************** PlbArb statuses 1276 - 1300 **************************/
407 #define XST_PLBARB_FAIL_SELFTEST 1276L
410 @name Plb2Opb Status Codes 1301 - 1325
413 /********************** Plb2Opb statuses 1301 - 1325 *************************/
415 #define XST_PLB2OPB_FAIL_SELFTEST 1301L
418 @name Opb2Plb Status 1326 - 1350
421 /********************** Opb2Plb statuses 1326 - 1350 *************************/
423 #define XST_OPB2PLB_FAIL_SELFTEST 1326L
426 @name SysAce Status Codes 1351 - 1360
429 /********************** SysAce statuses 1351 - 1360 **************************/
431 #define XST_SYSACE_NO_LOCK 1351L /*!< No MPU lock has been granted */
434 @name PCI Bridge Status Codes 1361 - 1375
437 /********************** PCI Bridge statuses 1361 - 1375 **********************/
439 #define XST_PCI_INVALID_ADDRESS 1361L
442 @name FlexRay Constants 1400 - 1409
445 /********************** FlexRay constants 1400 - 1409 *************************/
447 #define XST_FR_TX_ERROR 1400
448 #define XST_FR_TX_BUSY 1401
449 #define XST_FR_BUF_LOCKED 1402
450 #define XST_FR_NO_BUF 1403
453 @name USB constants 1410 - 1420
456 /****************** USB constants 1410 - 1420 *******************************/
458 #define XST_USB_ALREADY_CONFIGURED 1410
459 #define XST_USB_BUF_ALIGN_ERROR 1411
460 #define XST_USB_NO_DESC_AVAILABLE 1412
461 #define XST_USB_BUF_TOO_BIG 1413
462 #define XST_USB_NO_BUF 1414
465 @name HWICAP constants 1421 - 1429
468 /****************** HWICAP constants 1421 - 1429 *****************************/
470 #define XST_HWICAP_WRITE_DONE 1421
474 @name AXI VDMA constants 1430 - 1440
477 /****************** AXI VDMA constants 1430 - 1440 *****************************/
479 #define XST_VDMA_MISMATCH_ERROR 1430
482 @name NAND Flash Status Codes 1441 - 1459
485 /*********************** NAND Flash statuses 1441 - 1459 *********************/
487 #define XST_NAND_BUSY 1441L /*!< Flash is erasing or
490 #define XST_NAND_READY 1442L /*!< Flash is ready for commands
492 #define XST_NAND_ERROR 1443L /*!< Flash had detected an
495 #define XST_NAND_PART_NOT_SUPPORTED 1444L /*!< Flash type not supported by
498 #define XST_NAND_OPT_NOT_SUPPORTED 1445L /*!< Operation not supported
500 #define XST_NAND_TIMEOUT_ERROR 1446L /*!< Programming or erase
501 * operation aborted due to a
504 #define XST_NAND_ADDRESS_ERROR 1447L /*!< Accessed flash outside its
507 #define XST_NAND_ALIGNMENT_ERROR 1448L /*!< Write alignment error
509 #define XST_NAND_PARAM_PAGE_ERROR 1449L /*!< Failed to read parameter
512 #define XST_NAND_CACHE_ERROR 1450L /*!< Flash page buffer error
515 #define XST_NAND_WRITE_PROTECTED 1451L /*!< Flash is write protected
519 /**************************** Type Definitions *******************************/
523 /***************** Macros (Inline Functions) Definitions *********************/
526 /************************** Function Prototypes ******************************/
532 #endif /* end of protection macro */
534 * @} End of "addtogroup common_status_codes".