drivers/usb/gadget/udc/fsl_qe_udc.h
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/udc/fsl_qe_udc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/udc/fsl_qe_udc.h- Extension
.h- Size
- 12315 bytes
- Lines
- 418
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct usb_device_parastruct usb_ep_parastruct qe_framestruct qe_reqstruct qe_epstruct qe_udcfunction qe_frame_cleanfunction qe_frame_init
Annotated Snippet
struct usb_device_para{
u16 epptr[4];
u32 rstate;
u32 rptr;
u16 frame_n;
u16 rbcnt;
u32 rtemp;
u32 rxusb_data;
u16 rxuptr;
u8 reso[2];
u32 softbl;
u8 sofucrctemp;
};
struct usb_ep_para{
u16 rbase;
u16 tbase;
u8 rbmr;
u8 tbmr;
u16 mrblr;
u16 rbptr;
u16 tbptr;
u32 tstate;
u32 tptr;
u16 tcrc;
u16 tbcnt;
u32 ttemp;
u16 txusbu_ptr;
u8 reserve[2];
};
#define USB_BUSMODE_GBL 0x20
#define USB_BUSMODE_BO_MASK 0x18
#define USB_BUSMODE_BO_SHIFT 0x3
#define USB_BUSMODE_BE 0x2
#define USB_BUSMODE_CETM 0x04
#define USB_BUSMODE_DTB 0x02
/* Endpoint basic handle */
#define ep_index(EP) ((EP)->ep.desc->bEndpointAddress & 0xF)
#define ep_maxpacket(EP) ((EP)->ep.maxpacket)
#define ep_is_in(EP) ((ep_index(EP) == 0) ? (EP->udc->ep0_dir == \
USB_DIR_IN) : ((EP)->ep.desc->bEndpointAddress \
& USB_DIR_IN) == USB_DIR_IN)
/* ep0 transfer state */
#define WAIT_FOR_SETUP 0
#define DATA_STATE_XMIT 1
#define DATA_STATE_NEED_ZLP 2
#define WAIT_FOR_OUT_STATUS 3
#define DATA_STATE_RECV 4
/* ep tramsfer mode */
#define USBP_TM_CTL 0
#define USBP_TM_ISO 1
#define USBP_TM_BULK 2
#define USBP_TM_INT 3
/*-----------------------------------------------------------------------------
USB RX And TX DATA Frame
-----------------------------------------------------------------------------*/
struct qe_frame{
u8 *data;
u32 len;
u32 status;
u32 info;
void *privdata;
struct list_head node;
};
/* Frame structure, info field. */
#define PID_DATA0 0x80000000 /* Data toggle zero */
#define PID_DATA1 0x40000000 /* Data toggle one */
#define PID_SETUP 0x20000000 /* setup bit */
#define SETUP_STATUS 0x10000000 /* setup status bit */
#define SETADDR_STATUS 0x08000000 /* setupup address status bit */
#define NO_REQ 0x04000000 /* Frame without request */
#define HOST_DATA 0x02000000 /* Host data frame */
#define FIRST_PACKET_IN_FRAME 0x01000000 /* first packet in the frame */
#define TOKEN_FRAME 0x00800000 /* Host token frame */
#define ZLP 0x00400000 /* Zero length packet */
#define IN_TOKEN_FRAME 0x00200000 /* In token package */
#define OUT_TOKEN_FRAME 0x00100000 /* Out token package */
#define SETUP_TOKEN_FRAME 0x00080000 /* Setup token package */
#define STALL_FRAME 0x00040000 /* Stall handshake */
#define NACK_FRAME 0x00020000 /* Nack handshake */
#define NO_PID 0x00010000 /* No send PID */
#define NO_CRC 0x00008000 /* No send CRC */
#define HOST_COMMAND 0x00004000 /* Host command frame */
Annotation
- Detected declarations: `struct usb_device_para`, `struct usb_ep_para`, `struct qe_frame`, `struct qe_req`, `struct qe_ep`, `struct qe_udc`, `function qe_frame_clean`, `function qe_frame_init`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.