usb.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. /*
  2. * Copyright (c) 2012, Freescale Semiconductor, Inc.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without modification,
  6. * are permitted provided that the following conditions are met:
  7. *
  8. * o Redistributions of source code must retain the above copyright notice, this list
  9. * of conditions and the following disclaimer.
  10. *
  11. * o Redistributions in binary form must reproduce the above copyright notice, this
  12. * list of conditions and the following disclaimer in the documentation and/or
  13. * other materials provided with the distribution.
  14. *
  15. * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
  16. * contributors may be used to endorse or promote products derived from this
  17. * software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  23. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  24. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  26. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. /*
  31. * File: USB.h
  32. * Purpose: USB definitions
  33. *
  34. * Notes:
  35. */
  36. #ifndef _USB_H
  37. #define _USB_H
  38. #include "usb_defines.h"
  39. #include "usb_registers.h"
  40. //! @brief USB cores for mx6dq/mx6dl
  41. enum usbController {
  42. OTG = 0,
  43. Host1,
  44. Host2,
  45. Host3,
  46. OTG1,
  47. OTG2,
  48. HOST,
  49. };
  50. //! @brief USB phy types
  51. enum usbPhyType {
  52. Utmi, //! USB Transceiver Macrocell Interface
  53. Ulpi, //! UTMI+ low pin interface
  54. Serial, //! Serial interface
  55. Hsic //! High-Speed Inter-Chip
  56. };
  57. //! @brief USB bus speeds
  58. typedef enum usbPortSpeed {
  59. usbSpeedFull, //! Full speed, 12MHz
  60. usbSpeedLow, //! Low speed
  61. usbSpeedHigh, //! High speed, 480MHz
  62. usbSpeedUnknown,
  63. } usbPortSpeed_t;
  64. //! @brief the types of usb periodic list
  65. typedef enum usbPeriodicListType {
  66. listTypeIsochronous = 0, //! Isochronous Transfer
  67. listTypeQueueHead, //! Queue Head
  68. listTypeSplitTransaction, //! Split Transaction Isochronous Transfer
  69. listTypeFrameSpan //! Periodic Frame Span Traversal Node
  70. } usbPeriodicListType_t;
  71. //! @brief the data structure for USB core
  72. typedef struct usb_module {
  73. char *moduleName;
  74. enum usbController controllerID; //! USB Core used
  75. enum usbPhyType phyType; // UTMI, ULPI, Serial, HSIC
  76. } usb_module_t;
  77. /*!
  78. * usb host data structure definitions
  79. */
  80. /* USB host queue head structure */
  81. typedef struct usbhQueueHead {
  82. uint32_t queueHeadLinkPointer; //! Queue Head Horizontal Link Pointer
  83. uint32_t endpointCharacteristics; //! Characteristics
  84. uint32_t endpointCapabilities; //! Capabilities
  85. uint32_t currentQtd; //! Current qTD Pointer
  86. uint32_t nextQtd; //! Next qTD Pointer
  87. uint32_t alternateNextQtd; //! Alternate Next qTD pointer
  88. uint32_t qtdToken; //! Token
  89. uint32_t qtdBuffer[5]; //! Buffer Pointers
  90. uint32_t mallocPointer; /* Used to keep track of the
  91. memory block allocated for the data structure */
  92. } usbhQueueHead_t;
  93. /*!
  94. * USB host queue element transfer descriptor
  95. */
  96. typedef struct usbhTransferDescriptor {
  97. uint32_t nextQtd; //! Next qTD Pointer
  98. uint32_t alternateNextQtd; //! Alternate Next qTD Pointer
  99. uint32_t qtdToken; //! Token
  100. uint32_t qtdBuffer[5]; //! Buffer Pointers
  101. uint32_t mallocPointer; /* Used to keep track of the unaligned
  102. memory allocated for the data structure */
  103. } usbhTransferDescriptor_t;
  104. /*!
  105. * Protocol descriptor definitions, pleeae refer USB specification 2.0 for details.
  106. */
  107. typedef struct usbDeviceDescriptor {
  108. uint8_t bLength; //! Size of this descriptor in bytes
  109. uint8_t bDescriptorType; //! DEVICE Descriptor Type
  110. uint16_t bcdUSB; //! USB Specification Release Number
  111. uint8_t bDeviceClass; //! Class code
  112. uint8_t bDeviceSubClass; //! Subclass code
  113. uint8_t bDeviceProtocol; //! Protocol code
  114. uint8_t bMaxPacketSize; //! Maximum packet size for endpoint zero
  115. uint16_t idVendor; //! Vendor ID
  116. uint16_t idProduct; //! Product ID
  117. uint16_t bcdDevice; //! Device release number
  118. uint8_t iManufacturer; //! Index of string descriptor describing manufacturer
  119. uint8_t iProduct; //! Index of string descriptor describing product
  120. uint8_t iSerialNumber; //! Index of string descriptor describing the device's serial number
  121. uint8_t bNumConfigurations; //! Number of possible configurations
  122. } __attribute__ ((packed)) usbDeviceDescriptor_t;
  123. typedef struct usbConfigurationDescriptor {
  124. uint8_t bLength; //! Size of descriptor
  125. uint8_t bDescriptorType; //! CONFIGURATION Descriptor Type
  126. uint16_t wTotalLength; //! Total length of data returned for this configuration
  127. uint8_t bNumInterfaces; //! Number of interfaces supported by this configuration
  128. uint8_t bConfigurationValue; //! Value to use as an argument to the to select this configuration
  129. uint8_t iConfiguration; //! Index of string descriptor describing this configuration
  130. uint8_t bmAttributes; //! Configuration characteristics
  131. uint8_t MaxPower; //! Maximum power consumption of the USB device
  132. } __attribute__ ((packed)) usbConfigurationDescriptor_t;
  133. typedef struct usbInterfaceDescriptor {
  134. uint8_t bLength; //! Size of this descriptor in bytes
  135. uint8_t bDescriptorType; //! INTERFACE Descriptor Type
  136. uint8_t bInterfaceNumber; //! Number of this interface
  137. uint8_t bAlternateSetting; //! Value used to select this alternate setting
  138. uint8_t bNumEndpoints; //! Number of endpoints used by this interface
  139. uint8_t bInterfaceClass; //! Class code
  140. uint8_t bInterfaceSubClass; //! Subclass code
  141. uint8_t bInterfaceProtocol; //! Protocol code
  142. uint8_t iInterface; //! Index of string descriptor describing this interface
  143. } __attribute__ ((packed)) usbInterfaceDescriptor_t;
  144. /* USB Descriptor Types */
  145. #define DEVICE_DESCRIPTOR 0x1 //! Type for Device Descriptor
  146. #define CONFIG_DESCRIPTOR 0x2 //! Type for Configuration Descriptor
  147. #define STRING_DESCRIPTOR 0x3 //! Type for String Descriptor
  148. #define INTERFACE_DESCRIPTOR 0x4 //! Type for interface Descriptor
  149. #define ENDPOINT_DESCRIPTOR 0x5 //! Type for endpoint Descriptor
  150. #define DEVICE_QUALIFIER_DESCRIPTOR 0x6 //! Type for device qualifier descriptor
  151. #define OTHER_SPEED_CONFIG_DESCRIPTOR 0x7 //! Type for other speed configuration descriptor
  152. #define INTERFACE_POWER_DESCRIPTOR 0x8 //! Type for interface power descriptor
  153. //HID class interface descriptor definitions
  154. #define CLASS_CODE_HID 0x03 //! Class code for HID
  155. #define SUBCLASS_CODE_HID_NOSUBCLASS 0x00 //! Subclass code
  156. #define SUBCLASS_CODE_HID_BOOT_INTERFACE 0x01 //! Subcalss code
  157. #define PROTOCOL_CODE_HID_NONE 0x00 //!
  158. #define PROTOCOL_CODE_HID_KEYBOARD 0x01 //! HID protocol code: Keyboard
  159. #define PROTOCOL_CODE_HID_MOUSE 0x02 //! HID protocol code: Mouse
  160. //MSC class interface descriptor definitions
  161. #define CLASS_CODE_MSC 0x08
  162. #define SUBCLASS_CODE_MSC_RBC 0x01 /*Reduced Block Commandds, typically for a flash device */
  163. #define SUBCLASS_CODE_MSC_SFF8020 0x02 /*a CD/DVD device uses SFF-8020i or MMC-2 command blocks */
  164. #define SUBCLASS_CODE_MSC_QIC 0x03 /*a tape device uses QIC-157 command blocks */
  165. #define SUBCLASS_CODE_MSC_UFI 0x04 /*a floppy disk drive device */
  166. #define SUBCLASS_CODE_MSC_SFF8070 0x05 /*a floppy disk drive device */
  167. #define SUBCLASS_CODE_MSC_SCSI 0x06 /*SCSI transparent command set, popular in msc */
  168. #define PROTOCOL_CODE_MSC_CBI00 0x00 /*for floppy device - with command completion interrupt */
  169. #define PROTOCOL_CODE_MSC_CBI01 0x01 /*for floppy device - with no command completion interrupt */
  170. #define PROTOCOL_CODE_MSC_BOT 0x50 /*Bulk-Only Transport, popular in msc */
  171. //HUB class interface descriptor definitions
  172. #define CLASS_CODE_HUB 0x09 //! Class code for HUB
  173. #define SUBCLASS_CODE_HUB 0x00 //! Subclass code for HUB
  174. #define PROTOCOL_CODE_HUB_NON_HIGHSPEED 0x00 /*for full/low speed hub */
  175. #define PROTOCOL_CODE_HUB_MULTI_TT 0x02 /*multiple TT */
  176. #define PROTOCOL_CODE_USB_SINGLE_TT 0x01 /*single TT */
  177. typedef struct usbEndpointDescriptor {
  178. uint8_t bLength; //! Size of this descriptor in bytes
  179. uint8_t bDescriptorType; //! ENDPOINT Descriptor Type
  180. uint8_t bEndpointAddress; //! The address of the endpoint on the USB device described by this descriptor
  181. uint8_t bmAttributes; //! The endpoint'ss attributes
  182. uint16_t wMaxPacketSize; //! Maximum packet size
  183. uint8_t bInterval; //! Interval for polling endpoint for data transfers
  184. } __attribute__ ((packed)) usbEndpointDescriptor_t;
  185. typedef struct usbHidDescriptor {
  186. uint8_t bLength; //! Size of this descriptor in bytes
  187. uint8_t bDescriptorType; //! Descriptor Type
  188. uint16_t bcdHID; //! Release number
  189. uint8_t bCountryCode; //! Country code
  190. uint8_t bNumDescriptors; //! Number of descriptors
  191. uint8_t bReportDescriptorType; //! The type of report descriptor
  192. uint8_t wDescriptorLength[2]; // !!!! Not aligned on 16-bit boundary !!!
  193. } __attribute__ ((packed)) usbHidDescriptor_t;
  194. // USB HUB class-specific descriptor
  195. typedef struct usb_hub_descriptor {
  196. uint8_t bLength; //Number of bytes in this descriptor
  197. uint8_t bDescriptorType; //Descriptor type, must be 29H
  198. uint8_t bNbrPorts; //Number of downstream ports supported by this hub
  199. uint8_t bHubCharacteristics[2]; //Characteristics of this hub
  200. uint8_t bPwrOn2PwrGood; //Time(in 2ms intervals) from the time the power-on sequence begins
  201. // on a port until power is good on that port
  202. uint8_t bHubContrCurrent; //maximum current requirements of the hub controller electronics in mA
  203. uint8_t DeviceRemovable; //indicates if a port has a removable device attached
  204. } __attribute__ ((packed)) usb_hub_descriptor_t;
  205. /* HUB Class Feature Selctor Table 11-17*/
  206. #define HUB_CLASS_FEATURE_SELECTOR_C_HUB_LOCAL_POWER 0
  207. #define HUB_CLASS_FEATURE_SELECTOR_C_HUB_OVER_CURRENT 1
  208. #define HUB_CLASS_FEATURE_SELECTOR_PORT_CONNECTION 0
  209. #define HUB_CLASS_FEATURE_SELECTOR_PORT_ENABLE 1
  210. #define HUB_CLASS_FEATURE_SELECTOR_PORT_SUSPEND 2
  211. #define HUB_CLASS_FEATURE_SELECTOR_PORT_OVER_CURRENT 3
  212. #define HUB_CLASS_FEATURE_SELECTOR_PORT_RESET 4
  213. #define HUB_CLASS_FEATURE_SELECTOR_PORT_POWER 8
  214. #define HUB_CLASS_FEATURE_SELECTOR_PORT_LOW_SPEED 9
  215. #define HUB_CLASS_FEATURE_SELECTOR_C_PORT_CONNECTION 16
  216. #define HUB_CLASS_FEATURE_SELECTOR_C_PORT_ENABLE 17
  217. #define HUB_CLASS_FEATURE_SELECTOR_C_PORT_SUSPEND 18
  218. #define HUB_CLASS_FEATURE_SELECTOR_C_PORT_OVER_CURRENT 19
  219. #define HUB_CLASS_FEATURE_SELECTOR_C_PORT_RESET 20
  220. #define HUB_CLASS_FEATURE_SELECTOR_PORT_TEST 21
  221. #define HUB_CLASS_FEATURE_SELECTOR_PORT_INDICATOR 22
  222. #define NON_REMOVABLE_DEVICE_ATTACHED 0x1
  223. #define GANGED_POWER_SWICHING (0<<0)
  224. #define INDIVIDUAL_PORT_POWER_SWITHCING (1<<0)
  225. #define HUB_IS_PART_OF_COMPOUND_DEVICE (1<<2)
  226. #define HUB_NOT_PART_OF_COMPOUND_DEVICE (0<<2)
  227. #define GLOBAL_OVERCURRENT_PROTECT (0<<3)
  228. #define INDIVIDUAL_OVERCURRENT_PROTECT (1<<3)
  229. #define TT_THINK_TIME_08FS_BIT_TIMES (0<<5)
  230. #define TT_THINK_TIME_16FS_BIT_TIMES (1<<5)
  231. #define TT_THINK_TIME_24FS_BIT_TIMES (2<<5)
  232. #define TT_THINK_TIME_32FS_BIT_TIMES (3<<5)
  233. #define PORT_INDICATOR_NOT_SUPPORTED (0<<7)
  234. #define PORT_INDICATOR_SUPPORTED (1<<7)
  235. /* USB HUB Port Status, wPortStatus*/
  236. #define HUB_PORT_STATUS_DEVICE_PRESENT (1<<0)
  237. #define HUB_PORT_STATUS_PORT_ENABLED (1<<1)
  238. #define HUB_PORT_STATUS_PORT_SUSPEND (1<<2)
  239. #define HUB_PORT_STATUS_PORT_OVERCURRENT (1<<3)
  240. #define HUB_PORT_STATUS_PORT_RESET_ASSERTED (1<<4)
  241. #define HUB_PORT_STATUS_PORT_POWER_OFF (1<<8)
  242. #define HUB_PORT_STATUS_PORT_LSDEV_ATTACHED (1<<9)
  243. #define HUB_PORT_STATUS_PORT_HSDEV_ATTACHED (1<<10)
  244. #define HUB_PORT_STATUS_PORT_TEST (1<<11)
  245. #define HUB_PORT_STATUS_PORT_INDICATOR (1<<12)
  246. /* USB HUB Port Status, wPortChange*/
  247. #define HUB_PORT_CHANGE_CURRENT_CONNECT (1<<16)
  248. #define HUB_PORT_CHANGE_PORT_DISABLED (1<<17)
  249. #define HUB_PORT_CHANGE_PORT_RESUME_DONE (1<<18)
  250. #define HUB_PORT_CHANGE_PORT_OC_INDICATOR (1<<19)
  251. #define HUB_PORT_CHANGE_PORT_RESET_COMPLETE (1<<20)
  252. /*!
  253. * Device driver definitions
  254. */
  255. /*!
  256. * USB device endpoint list
  257. */
  258. typedef uint32_t endpointList_t[8];
  259. /*
  260. * USB device setup packet
  261. */
  262. typedef struct usbdSetupPacket {
  263. uint8_t bRequestType; //! Characteristics of request
  264. uint8_t bRequest; //! Specific request
  265. uint16_t wValue; //! Word-sized field that varies according to request
  266. uint16_t wIndex; //! Index
  267. uint16_t wLength; //! Number of bytes to transfer
  268. } __attribute__ ((packed)) usbdSetupPacket_t;
  269. /*!
  270. * USB device endpoint queue head structure
  271. */
  272. typedef struct usbdDeviceEndpointQueueHead {
  273. uint32_t endpointCharacteristics; //! Endpoint Capabilities/Characteristics
  274. uint32_t currentDtd; //! Current dTD Pointer
  275. uint32_t nextDtd; //! Next dTD Pointer
  276. uint32_t dtdToken; //! Token
  277. uint32_t dtdBuffer[5]; //! Buffer Pointers
  278. uint32_t reserved;
  279. usbdSetupPacket_t setupBuffer; //! Set-up Buffer
  280. uint32_t reserved1[4];
  281. } usbdDeviceEndpointQueueHead_t;
  282. //! brief USB endpoint pair sturcture
  283. typedef struct usbdEndpointPair {
  284. usbdDeviceEndpointQueueHead_t out;
  285. usbdDeviceEndpointQueueHead_t in;
  286. } usbdEndpointPair_t;
  287. /*
  288. * USB device endpoint transfer descriptor
  289. */
  290. typedef struct usbdEndpointDtd {
  291. uint32_t nextDtd; //! Next data transfer descriptor
  292. uint32_t dtdToken; //! Token
  293. uint32_t dtdBuffer[5]; //! Buffers for data to be transferred
  294. uint32_t mallocPointer; /* Used to keep track of the memory allocated for the data structure */
  295. } usbdEndpointDtd_t;
  296. /*!
  297. * Endpoint characteristics
  298. */
  299. typedef enum usbdEndpointDirection {
  300. IN,
  301. OUT
  302. } usbdEndpointDirection_t;
  303. //! @brief Structure to describle the endpoint
  304. typedef struct usbdEndpointInfo {
  305. usbPortSpeed_t Speed; //! Speed of this endpoint, High/Low/Full
  306. uint32_t endpointNumber; //! Index of this endpoint
  307. usbdEndpointDirection_t endpointDirection; //! Direction, IN/OUT
  308. uint32_t mult;
  309. uint32_t maxPacketLength; //! Max packet length supported by this endpoint
  310. bool interruptOnSetup; //! Interupt issued when setup packet arrived
  311. } usbdEndpointInfo_t;
  312. /*!
  313. * Definitions for Setup packet
  314. */
  315. /* Defines for commands in setup packets */
  316. #define GET_DESCRIPTOR 0x8006
  317. #define SET_CONFIGURATION 0x0009
  318. #define SET_IDLE 0x210A
  319. #define GET_HID_CLASS_DESCRIPTOR 0x8106
  320. #define SET_FEATURE 0x0003
  321. //! @name Board support functions
  322. //!
  323. //! The functions are called by the usb driver and must be defined by the board
  324. //! support library or the application. Their purpose is to isolate the usb driver
  325. //! from board-specific configuration.
  326. //@{
  327. void reset_usb_hub(void);
  328. //@}
  329. //! Host driver function prototypes
  330. int usbh_init(usb_module_t *);
  331. void usbh_bus_reset(usb_module_t *);
  332. void get_setup_packet(usb_module_t *, uint32_t, uint32_t *, uint32_t *);
  333. void usbh_enable_asynchronous_schedule(usb_module_t * port);
  334. void usbh_disable_asynchronous_schedule(usb_module_t * port);
  335. uint32_t usbh_periodic_schedule_init(usb_module_t *, uint32_t frame_list_size,
  336. uint32_t * frame_list);
  337. usbhTransferDescriptor_t *usbh_qtd_init(uint32_t, uint32_t, uint32_t, uint32_t *);
  338. usbhQueueHead_t *usbh_qh_init(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
  339. uint32_t swap32(uint32_t data);
  340. //! device driver function prototypes
  341. uint32_t usbd_device_init(usb_module_t * port, usbdEndpointPair_t * endpointList);
  342. usbPortSpeed_t usbd_bus_reset(usb_module_t * port);
  343. void usbd_get_setup_packet(usb_module_t * port, usbdEndpointPair_t * endpointList,
  344. usbdSetupPacket_t * setupPacket);
  345. void usbd_device_send_control_packet(usb_module_t * port, usbdEndpointPair_t * endpointList,
  346. uint8_t * buffer, uint32_t size);
  347. void usbd_device_send_zero_len_packet(usb_module_t * port, usbdEndpointPair_t * endpointList,
  348. uint32_t endpoint);
  349. void usbd_endpoint_qh_init(usbdEndpointPair_t * endpointList, usbdEndpointInfo_t * usbdEndpoint,
  350. uint32_t nextDtd);
  351. void usbd_add_dtd(usb_module_t * port, usbdEndpointPair_t * endpointList,
  352. usbdEndpointInfo_t * usbdEndpoint, usbdEndpointDtd_t * new_dtd);
  353. usbdEndpointDtd_t *usbd_dtd_init(uint32_t transferSize, uint32_t interruptOnComplete,
  354. uint32_t multOverride, uint32_t * bufferPointer);
  355. usbdEndpointDtd_t *usbd_reclaim_dtd(usb_module_t * port, usbdEndpointPair_t * endpointList,
  356. usbdEndpointInfo_t * usbdEndpoint, usbdEndpointDtd_t * head);
  357. void fillBuffer(uint32_t * buffer);
  358. //! common prototypes
  359. usbPortSpeed_t usb_get_port_speed(usb_module_t * port);
  360. int usbEnableClocks(usb_module_t * port);
  361. int usbEnableTransceiver(usb_module_t * port);
  362. int get_menu_item(char *menu_table[]);
  363. #define DTD_TERMINATE 0xDEAD001
  364. #define QTD_TERMINATE 0xDEAD001
  365. #define OUT_PID 0
  366. #define IN_PID 1
  367. #define SETUP_PID 2
  368. #define EPS_FULL 0
  369. #define EPS_LOW 1
  370. #define EPS_HIGH 2
  371. /*!
  372. * Memeory allocation configuration
  373. */
  374. #define MAX_USB_BUFFER_SIZE 0x100
  375. #define MAX_USB_DESC_SIZE 0x40
  376. #define MAX_QTD_TRANS_SIZE 0x5000
  377. #define MAX_DTD_TRANS_SIZE 0x5000
  378. #define MAX_QH_PACKET_SIZE 0x400
  379. #endif /* _USB_H */