drivers/usb/host/fhci.h
Source file repositories/reference/linux-study-clean/drivers/usb/host/fhci.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/host/fhci.h- Extension
.h- Size
- 18714 bytes
- Lines
- 590
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/types.hlinux/bug.hlinux/spinlock.hlinux/interrupt.hlinux/kfifo.hlinux/io.hlinux/usb.hlinux/usb/hcd.hlinux/gpio/consumer.hsoc/fsl/qe/qe.hsoc/fsl/qe/immap_qe.h
Detected Declarations
struct fhci_pramstruct fhci_ep_pramstruct fhci_controller_liststruct virtual_root_hubstruct fhci_hcdstruct edstruct tdstruct packetstruct urb_privstruct endpointstruct fhci_time_framestruct fhci_usbenum fhci_gpiosenum fhci_pinsenum fhci_ta_typeenum fhci_tf_modeenum fhci_speedenum fhci_ed_stateenum fhci_port_statusenum fhci_mem_allocfunction get_frame_numfunction dev_dbgfunction cq_newfunction cq_deletefunction cq_howmanyfunction cq_putfunction fhci_dbg_isr
Annotated Snippet
struct fhci_pram {
__be16 ep_ptr[4]; /* Endpoint porter reg */
__be32 rx_state; /* Rx internal state */
__be32 rx_ptr; /* Rx internal data pointer */
__be16 frame_num; /* Frame number */
__be16 rx_cnt; /* Rx byte count */
__be32 rx_temp; /* Rx temp */
__be32 rx_data_temp; /* Rx data temp */
__be16 rx_u_ptr; /* Rx microcode return address temp */
u8 reserved1[2]; /* reserved area */
__be32 sof_tbl; /* SOF lookup table pointer */
u8 sof_u_crc_temp; /* SOF micorcode CRC5 temp reg */
u8 reserved2[0xdb];
};
/* Freescale USB Endpoint*/
struct fhci_ep_pram {
__be16 rx_base; /* Rx BD base address */
__be16 tx_base; /* Tx BD base address */
u8 rx_func_code; /* Rx function code */
u8 tx_func_code; /* Tx function code */
__be16 rx_buff_len; /* Rx buffer length */
__be16 rx_bd_ptr; /* Rx BD pointer */
__be16 tx_bd_ptr; /* Tx BD pointer */
__be32 tx_state; /* Tx internal state */
__be32 tx_ptr; /* Tx internal data pointer */
__be16 tx_crc; /* temp transmit CRC */
__be16 tx_cnt; /* Tx byte count */
__be32 tx_temp; /* Tx temp */
__be16 tx_u_ptr; /* Tx microcode return address temp */
__be16 reserved;
};
struct fhci_controller_list {
struct list_head ctrl_list; /* control endpoints */
struct list_head bulk_list; /* bulk endpoints */
struct list_head iso_list; /* isochronous endpoints */
struct list_head intr_list; /* interruput endpoints */
struct list_head done_list; /* done transfers */
};
struct virtual_root_hub {
int dev_num; /* USB address of the root hub */
u32 feature; /* indicates what feature has been set */
struct usb_hub_status hub;
struct usb_port_status port;
};
enum fhci_gpios {
GPIO_USBOE = 0,
GPIO_USBTP,
GPIO_USBTN,
GPIO_USBRP,
GPIO_USBRN,
/* these are optional */
GPIO_SPEED,
GPIO_POWER,
NUM_GPIOS,
};
enum fhci_pins {
PIN_USBOE = 0,
PIN_USBTP,
PIN_USBTN,
NUM_PINS,
};
struct fhci_hcd {
enum qe_clock fullspeed_clk;
enum qe_clock lowspeed_clk;
struct qe_pin *pins[NUM_PINS];
struct gpio_desc *gpiods[NUM_GPIOS];
struct qe_usb_ctlr __iomem *regs; /* I/O memory used to communicate */
struct fhci_pram __iomem *pram; /* Parameter RAM */
struct gtm_timer *timer;
spinlock_t lock;
struct fhci_usb *usb_lld; /* Low-level driver */
struct virtual_root_hub *vroot_hub; /* the virtual root hub */
int active_urbs;
struct fhci_controller_list *hc_list;
struct tasklet_struct *process_done_task; /* tasklet for done list */
struct list_head empty_eds;
struct list_head empty_tds;
#ifdef CONFIG_FHCI_DEBUG
int usb_irq_stat[13];
struct dentry *dfs_root;
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/types.h`, `linux/bug.h`, `linux/spinlock.h`, `linux/interrupt.h`, `linux/kfifo.h`, `linux/io.h`, `linux/usb.h`.
- Detected declarations: `struct fhci_pram`, `struct fhci_ep_pram`, `struct fhci_controller_list`, `struct virtual_root_hub`, `struct fhci_hcd`, `struct ed`, `struct td`, `struct packet`, `struct urb_priv`, `struct endpoint`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.