xstatus.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /******************************************************************************
  2. *
  3. * Author: Xilinx, Inc.
  4. *
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation; either version 2 of the License, or (at your
  9. * option) any later version.
  10. *
  11. *
  12. * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
  13. * COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
  14. * ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
  15. * XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
  16. * FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
  17. * ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
  18. * XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
  19. * THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
  20. * WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
  21. * CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
  22. * FITNESS FOR A PARTICULAR PURPOSE.
  23. *
  24. *
  25. * Xilinx hardware products are not intended for use in life support
  26. * appliances, devices, or systems. Use in such applications is
  27. * expressly prohibited.
  28. *
  29. *
  30. * (c) Copyright 2002-2004 Xilinx Inc.
  31. * All rights reserved.
  32. *
  33. *
  34. * You should have received a copy of the GNU General Public License along
  35. * with this program; if not, write to the Free Software Foundation, Inc.,
  36. * 675 Mass Ave, Cambridge, MA 02139, USA.
  37. *
  38. ******************************************************************************/
  39. /*****************************************************************************/
  40. /**
  41. *
  42. * @file xstatus.h
  43. *
  44. * This file contains Xilinx software status codes. Status codes have their
  45. * own data type called XStatus. These codes are used throughout the Xilinx
  46. * device drivers.
  47. *
  48. ******************************************************************************/
  49. #ifndef XSTATUS_H /* prevent circular inclusions */
  50. #define XSTATUS_H /* by using protection macros */
  51. /***************************** Include Files *********************************/
  52. #include "xbasic_types.h"
  53. /************************** Constant Definitions *****************************/
  54. /*********************** Common statuses 0 - 500 *****************************/
  55. #define XST_SUCCESS 0L
  56. #define XST_FAILURE 1L
  57. #define XST_DEVICE_NOT_FOUND 2L
  58. #define XST_DEVICE_BLOCK_NOT_FOUND 3L
  59. #define XST_INVALID_VERSION 4L
  60. #define XST_DEVICE_IS_STARTED 5L
  61. #define XST_DEVICE_IS_STOPPED 6L
  62. #define XST_FIFO_ERROR 7L /* an error occurred during an
  63. operation with a FIFO such as
  64. an underrun or overrun, this
  65. error requires the device to
  66. be reset */
  67. #define XST_RESET_ERROR 8L /* an error occurred which requires
  68. the device to be reset */
  69. #define XST_DMA_ERROR 9L /* a DMA error occurred, this error
  70. typically requires the device
  71. using the DMA to be reset */
  72. #define XST_NOT_POLLED 10L /* the device is not configured for
  73. polled mode operation */
  74. #define XST_FIFO_NO_ROOM 11L /* a FIFO did not have room to put
  75. the specified data into */
  76. #define XST_BUFFER_TOO_SMALL 12L /* the buffer is not large enough
  77. to hold the expected data */
  78. #define XST_NO_DATA 13L /* there was no data available */
  79. #define XST_REGISTER_ERROR 14L /* a register did not contain the
  80. expected value */
  81. #define XST_INVALID_PARAM 15L /* an invalid parameter was passed
  82. into the function */
  83. #define XST_NOT_SGDMA 16L /* the device is not configured for
  84. scatter-gather DMA operation */
  85. #define XST_LOOPBACK_ERROR 17L /* a loopback test failed */
  86. #define XST_NO_CALLBACK 18L /* a callback has not yet been
  87. * registered */
  88. #define XST_NO_FEATURE 19L /* device is not configured with
  89. * the requested feature */
  90. #define XST_NOT_INTERRUPT 20L /* device is not configured for
  91. * interrupt mode operation */
  92. #define XST_DEVICE_BUSY 21L /* device is busy */
  93. #define XST_ERROR_COUNT_MAX 22L /* the error counters of a device
  94. * have maxed out */
  95. #define XST_IS_STARTED 23L /* used when part of device is
  96. * already started i.e.
  97. * sub channel */
  98. #define XST_IS_STOPPED 24L /* used when part of device is
  99. * already stopped i.e.
  100. * sub channel */
  101. /***************** Utility Component statuses 401 - 500 *********************/
  102. #define XST_MEMTEST_FAILED 401L /* memory test failed */
  103. /***************** Common Components statuses 501 - 1000 *********************/
  104. /********************* Packet Fifo statuses 501 - 510 ************************/
  105. #define XST_PFIFO_LACK_OF_DATA 501L /* not enough data in FIFO */
  106. #define XST_PFIFO_NO_ROOM 502L /* not enough room in FIFO */
  107. #define XST_PFIFO_BAD_REG_VALUE 503L /* self test, a register value
  108. was invalid after reset */
  109. /************************** DMA statuses 511 - 530 ***************************/
  110. #define XST_DMA_TRANSFER_ERROR 511L /* self test, DMA transfer
  111. failed */
  112. #define XST_DMA_RESET_REGISTER_ERROR 512L /* self test, a register value
  113. was invalid after reset */
  114. #define XST_DMA_SG_LIST_EMPTY 513L /* scatter gather list contains
  115. no buffer descriptors ready
  116. to be processed */
  117. #define XST_DMA_SG_IS_STARTED 514L /* scatter gather not stopped */
  118. #define XST_DMA_SG_IS_STOPPED 515L /* scatter gather not running */
  119. #define XST_DMA_SG_LIST_FULL 517L /* all the buffer desciptors of
  120. the scatter gather list are
  121. being used */
  122. #define XST_DMA_SG_BD_LOCKED 518L /* the scatter gather buffer
  123. descriptor which is to be
  124. copied over in the scatter
  125. list is locked */
  126. #define XST_DMA_SG_NOTHING_TO_COMMIT 519L /* no buffer descriptors have been
  127. put into the scatter gather
  128. list to be commited */
  129. #define XST_DMA_SG_COUNT_EXCEEDED 521L /* the packet count threshold
  130. specified was larger than the
  131. total # of buffer descriptors
  132. in the scatter gather list */
  133. #define XST_DMA_SG_LIST_EXISTS 522L /* the scatter gather list has
  134. already been created */
  135. #define XST_DMA_SG_NO_LIST 523L /* no scatter gather list has
  136. been created */
  137. #define XST_DMA_SG_BD_NOT_COMMITTED 524L /* the buffer descriptor which was
  138. being started was not committed
  139. to the list */
  140. #define XST_DMA_SG_NO_DATA 525L /* the buffer descriptor to start
  141. has already been used by the
  142. hardware so it can't be reused
  143. */
  144. /************************** IPIF statuses 531 - 550 ***************************/
  145. #define XST_IPIF_REG_WIDTH_ERROR 531L /* an invalid register width
  146. was passed into the function */
  147. #define XST_IPIF_RESET_REGISTER_ERROR 532L /* the value of a register at
  148. reset was not valid */
  149. #define XST_IPIF_DEVICE_STATUS_ERROR 533L /* a write to the device interrupt
  150. status register did not read
  151. back correctly */
  152. #define XST_IPIF_DEVICE_ACK_ERROR 534L /* the device interrupt status
  153. register did not reset when
  154. acked */
  155. #define XST_IPIF_DEVICE_ENABLE_ERROR 535L /* the device interrupt enable
  156. register was not updated when
  157. other registers changed */
  158. #define XST_IPIF_IP_STATUS_ERROR 536L /* a write to the IP interrupt
  159. status register did not read
  160. back correctly */
  161. #define XST_IPIF_IP_ACK_ERROR 537L /* the IP interrupt status register
  162. did not reset when acked */
  163. #define XST_IPIF_IP_ENABLE_ERROR 538L /* IP interrupt enable register was
  164. not updated correctly when other
  165. registers changed */
  166. #define XST_IPIF_DEVICE_PENDING_ERROR 539L /* The device interrupt pending
  167. register did not indicate the
  168. expected value */
  169. #define XST_IPIF_DEVICE_ID_ERROR 540L /* The device interrupt ID register
  170. did not indicate the expected
  171. value */
  172. /****************** Device specific statuses 1001 - 4095 *********************/
  173. /********************* Ethernet statuses 1001 - 1050 *************************/
  174. #define XST_EMAC_MEMORY_SIZE_ERROR 1001L /* Memory space is not big enough
  175. * to hold the minimum number of
  176. * buffers or descriptors */
  177. #define XST_EMAC_MEMORY_ALLOC_ERROR 1002L /* Memory allocation failed */
  178. #define XST_EMAC_MII_READ_ERROR 1003L /* MII read error */
  179. #define XST_EMAC_MII_BUSY 1004L /* An MII operation is in progress */
  180. #define XST_EMAC_OUT_OF_BUFFERS 1005L /* Adapter is out of buffers */
  181. #define XST_EMAC_PARSE_ERROR 1006L /* Invalid adapter init string */
  182. #define XST_EMAC_COLLISION_ERROR 1007L /* Excess deferral or late
  183. * collision on polled send */
  184. /*********************** UART statuses 1051 - 1075 ***************************/
  185. #define XST_UART
  186. #define XST_UART_INIT_ERROR 1051L
  187. #define XST_UART_START_ERROR 1052L
  188. #define XST_UART_CONFIG_ERROR 1053L
  189. #define XST_UART_TEST_FAIL 1054L
  190. #define XST_UART_BAUD_ERROR 1055L
  191. #define XST_UART_BAUD_RANGE 1056L
  192. /************************ IIC statuses 1076 - 1100 ***************************/
  193. #define XST_IIC_SELFTEST_FAILED 1076 /* self test failed */
  194. #define XST_IIC_BUS_BUSY 1077 /* bus found busy */
  195. #define XST_IIC_GENERAL_CALL_ADDRESS 1078 /* mastersend attempted with */
  196. /* general call address */
  197. #define XST_IIC_STAND_REG_RESET_ERROR 1079 /* A non parameterizable reg */
  198. /* value after reset not valid */
  199. #define XST_IIC_TX_FIFO_REG_RESET_ERROR 1080 /* Tx fifo included in design */
  200. /* value after reset not valid */
  201. #define XST_IIC_RX_FIFO_REG_RESET_ERROR 1081 /* Rx fifo included in design */
  202. /* value after reset not valid */
  203. #define XST_IIC_TBA_REG_RESET_ERROR 1082 /* 10 bit addr incl in design */
  204. /* value after reset not valid */
  205. #define XST_IIC_CR_READBACK_ERROR 1083 /* Read of the control register */
  206. /* didn't return value written */
  207. #define XST_IIC_DTR_READBACK_ERROR 1084 /* Read of the data Tx reg */
  208. /* didn't return value written */
  209. #define XST_IIC_DRR_READBACK_ERROR 1085 /* Read of the data Receive reg */
  210. /* didn't return value written */
  211. #define XST_IIC_ADR_READBACK_ERROR 1086 /* Read of the data Tx reg */
  212. /* didn't return value written */
  213. #define XST_IIC_TBA_READBACK_ERROR 1087 /* Read of the 10 bit addr reg */
  214. /* didn't return written value */
  215. #define XST_IIC_NOT_SLAVE 1088 /* The device isn't a slave */
  216. /*********************** ATMC statuses 1101 - 1125 ***************************/
  217. #define XST_ATMC_ERROR_COUNT_MAX 1101L /* the error counters in the ATM
  218. controller hit the max value
  219. which requires the statistics
  220. to be cleared */
  221. /*********************** Flash statuses 1126 - 1150 **************************/
  222. #define XST_FLASH_BUSY 1126L /* Flash is erasing or programming */
  223. #define XST_FLASH_READY 1127L /* Flash is ready for commands */
  224. #define XST_FLASH_ERROR 1128L /* Flash had detected an internal
  225. error. Use XFlash_DeviceControl
  226. to retrieve device specific codes */
  227. #define XST_FLASH_ERASE_SUSPENDED 1129L /* Flash is in suspended erase state */
  228. #define XST_FLASH_WRITE_SUSPENDED 1130L /* Flash is in suspended write state */
  229. #define XST_FLASH_PART_NOT_SUPPORTED 1131L /* Flash type not supported by
  230. driver */
  231. #define XST_FLASH_NOT_SUPPORTED 1132L /* Operation not supported */
  232. #define XST_FLASH_TOO_MANY_REGIONS 1133L /* Too many erase regions */
  233. #define XST_FLASH_TIMEOUT_ERROR 1134L /* Programming or erase operation
  234. aborted due to a timeout */
  235. #define XST_FLASH_ADDRESS_ERROR 1135L /* Accessed flash outside its
  236. addressible range */
  237. #define XST_FLASH_ALIGNMENT_ERROR 1136L /* Write alignment error */
  238. #define XST_FLASH_BLOCKING_CALL_ERROR 1137L /* Couldn't return immediately from
  239. write/erase function with
  240. XFL_NON_BLOCKING_WRITE/ERASE
  241. option cleared */
  242. #define XST_FLASH_CFI_QUERY_ERROR 1138L /* Failed to query the device */
  243. /*********************** SPI statuses 1151 - 1175 ****************************/
  244. #define XST_SPI_MODE_FAULT 1151 /* master was selected as slave */
  245. #define XST_SPI_TRANSFER_DONE 1152 /* data transfer is complete */
  246. #define XST_SPI_TRANSMIT_UNDERRUN 1153 /* slave underruns transmit register */
  247. #define XST_SPI_RECEIVE_OVERRUN 1154 /* device overruns receive register */
  248. #define XST_SPI_NO_SLAVE 1155 /* no slave has been selected yet */
  249. #define XST_SPI_TOO_MANY_SLAVES 1156 /* more than one slave is being
  250. * selected */
  251. #define XST_SPI_NOT_MASTER 1157 /* operation is valid only as master */
  252. #define XST_SPI_SLAVE_ONLY 1158 /* device is configured as slave-only */
  253. #define XST_SPI_SLAVE_MODE_FAULT 1159 /* slave was selected while disabled */
  254. /********************** OPB Arbiter statuses 1176 - 1200 *********************/
  255. #define XST_OPBARB_INVALID_PRIORITY 1176 /* the priority registers have either
  256. * one master assigned to two or more
  257. * priorities, or one master not
  258. * assigned to any priority
  259. */
  260. #define XST_OPBARB_NOT_SUSPENDED 1177 /* an attempt was made to modify the
  261. * priority levels without first
  262. * suspending the use of priority
  263. * levels
  264. */
  265. #define XST_OPBARB_PARK_NOT_ENABLED 1178 /* bus parking by id was enabled but
  266. * bus parking was not enabled
  267. */
  268. #define XST_OPBARB_NOT_FIXED_PRIORITY 1179 /* the arbiter must be in fixed
  269. * priority mode to allow the
  270. * priorities to be changed
  271. */
  272. /************************ Intc statuses 1201 - 1225 **************************/
  273. #define XST_INTC_FAIL_SELFTEST 1201 /* self test failed */
  274. #define XST_INTC_CONNECT_ERROR 1202 /* interrupt already in use */
  275. /********************** TmrCtr statuses 1226 - 1250 **************************/
  276. #define XST_TMRCTR_TIMER_FAILED 1226 /* self test failed */
  277. /********************** WdtTb statuses 1251 - 1275 ***************************/
  278. #define XST_WDTTB_TIMER_FAILED 1251L
  279. /********************** PlbArb statuses 1276 - 1300 **************************/
  280. #define XST_PLBARB_FAIL_SELFTEST 1276L
  281. /********************** Plb2Opb statuses 1301 - 1325 *************************/
  282. #define XST_PLB2OPB_FAIL_SELFTEST 1301L
  283. /********************** Opb2Plb statuses 1326 - 1350 *************************/
  284. #define XST_OPB2PLB_FAIL_SELFTEST 1326L
  285. /********************** SysAce statuses 1351 - 1360 **************************/
  286. #define XST_SYSACE_NO_LOCK 1351L /* No MPU lock has been granted */
  287. /********************** PCI Bridge statuses 1361 - 1375 **********************/
  288. #define XST_PCI_INVALID_ADDRESS 1361L
  289. /**************************** Type Definitions *******************************/
  290. /**
  291. * The status typedef.
  292. */
  293. typedef u32 XStatus;
  294. /***************** Macros (Inline Functions) Definitions *********************/
  295. /************************** Function Prototypes ******************************/
  296. #endif /* end of protection macro */