drivers/usb/fotg210/fotg210-hcd.h
Source file repositories/reference/linux-study-clean/drivers/usb/fotg210/fotg210-hcd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/fotg210/fotg210-hcd.h- Extension
.h- Size
- 22655 bytes
- Lines
- 690
- 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
linux/usb/ehci-dbgp.h
Detected Declarations
struct fotg210_statsstruct fotg210_hcdstruct fotg210_capsstruct fotg210_regsstruct fotg210_qtdstruct fotg210_qh_hwstruct fotg210_qhstruct fotg210_iso_packetstruct fotg210_iso_schedstruct fotg210_iso_streamstruct fotg210_itdstruct fotg210_fstnenum fotg210_rh_stateenum fotg210_hrtimer_eventfunction fotg210_adjust_port_wakeup_flagsfunction fotg210_port_speedfunction fotg210_readlfunction fotg210_writelfunction cpu_to_hc32function hc32_to_cpufunction hc32_to_cpupfunction fotg210_read_frame_index
Annotated Snippet
struct fotg210_stats {
/* irq usage */
unsigned long normal;
unsigned long error;
unsigned long iaa;
unsigned long lost_iaa;
/* termination of urbs from core */
unsigned long complete;
unsigned long unlink;
};
/* fotg210_hcd->lock guards shared data against other CPUs:
* fotg210_hcd: async, unlink, periodic (and shadow), ...
* usb_host_endpoint: hcpriv
* fotg210_qh: qh_next, qtd_list
* fotg210_qtd: qtd_list
*
* Also, hold this lock when talking to HC registers or
* when updating hw_* fields in shared qh/qtd/... structures.
*/
#define FOTG210_MAX_ROOT_PORTS 1 /* see HCS_N_PORTS */
/*
* fotg210_rh_state values of FOTG210_RH_RUNNING or above mean that the
* controller may be doing DMA. Lower values mean there's no DMA.
*/
enum fotg210_rh_state {
FOTG210_RH_HALTED,
FOTG210_RH_SUSPENDED,
FOTG210_RH_RUNNING,
FOTG210_RH_STOPPING
};
/*
* Timer events, ordered by increasing delay length.
* Always update event_delays_ns[] and event_handlers[] (defined in
* ehci-timer.c) in parallel with this list.
*/
enum fotg210_hrtimer_event {
FOTG210_HRTIMER_POLL_ASS, /* Poll for async schedule off */
FOTG210_HRTIMER_POLL_PSS, /* Poll for periodic schedule off */
FOTG210_HRTIMER_POLL_DEAD, /* Wait for dead controller to stop */
FOTG210_HRTIMER_UNLINK_INTR, /* Wait for interrupt QH unlink */
FOTG210_HRTIMER_FREE_ITDS, /* Wait for unused iTDs and siTDs */
FOTG210_HRTIMER_ASYNC_UNLINKS, /* Unlink empty async QHs */
FOTG210_HRTIMER_IAA_WATCHDOG, /* Handle lost IAA interrupts */
FOTG210_HRTIMER_DISABLE_PERIODIC, /* Wait to disable periodic sched */
FOTG210_HRTIMER_DISABLE_ASYNC, /* Wait to disable async sched */
FOTG210_HRTIMER_IO_WATCHDOG, /* Check for missing IRQs */
FOTG210_HRTIMER_NUM_EVENTS /* Must come last */
};
#define FOTG210_HRTIMER_NO_EVENT 99
struct fotg210_hcd { /* one per controller */
/* timing support */
enum fotg210_hrtimer_event next_hrtimer_event;
unsigned enabled_hrtimer_events;
ktime_t hr_timeouts[FOTG210_HRTIMER_NUM_EVENTS];
struct hrtimer hrtimer;
int PSS_poll_count;
int ASS_poll_count;
int died_poll_count;
/* glue to PCI and HCD framework */
struct fotg210_caps __iomem *caps;
struct fotg210_regs __iomem *regs;
struct ehci_dbg_port __iomem *debug;
__u32 hcs_params; /* cached register copy */
spinlock_t lock;
enum fotg210_rh_state rh_state;
/* general schedule support */
bool scanning:1;
bool need_rescan:1;
bool intr_unlinking:1;
bool async_unlinking:1;
bool shutdown:1;
struct fotg210_qh *qh_scan_next;
/* async schedule support */
struct fotg210_qh *async;
struct fotg210_qh *dummy; /* For AMD quirk use */
struct fotg210_qh *async_unlink;
struct fotg210_qh *async_unlink_last;
struct fotg210_qh *async_iaa;
unsigned async_unlink_cycle;
Annotation
- Immediate include surface: `linux/usb/ehci-dbgp.h`.
- Detected declarations: `struct fotg210_stats`, `struct fotg210_hcd`, `struct fotg210_caps`, `struct fotg210_regs`, `struct fotg210_qtd`, `struct fotg210_qh_hw`, `struct fotg210_qh`, `struct fotg210_iso_packet`, `struct fotg210_iso_sched`, `struct fotg210_iso_stream`.
- 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.