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,
};
/* endpoint state */ enum fhci_ed_state {
FHCI_ED_NEW = 0, /* pipe is new */
FHCI_ED_OPER, /* pipe is operating */
FHCI_ED_URB_DEL, /* pipe is in hold because urb is being deleted */
FHCI_ED_SKIP, /* skip this pipe */
FHCI_ED_HALTED, /* pipe is halted */
};
/* USB default parameters*/ #define DEFAULT_RING_LEN 8 #define DEFAULT_DATA_MEM MEM_CACHABLE_SYS
struct ed {
u8 dev_addr; /* device address */
u8 ep_addr; /* endpoint address */ enum fhci_tf_mode mode; /* USB transfer mode */ enum fhci_speed speed; unsignedint max_pkt_size; enum fhci_ed_state state; struct list_head td_list; /* a list of all queued TD to this pipe */ struct list_head node;
/* read only parameters, should be cleared upon initialization */
u8 toggle_carry; /* toggle carry from the last TD submitted */
u16 next_iso; /* time stamp of next queued ISO transfer */ struct td *td_head; /* a pointer to the current TD handled */
};
struct td { void *data; /* a pointer to the data buffer */ unsignedint len; /* length of the data to be submitted */ unsignedint actual_len; /* actual bytes transferred on this td */ enum fhci_ta_type type; /* transaction type */
u8 toggle; /* toggle for next trans. within this TD */
u16 iso_index; /* ISO transaction index */
u16 start_frame; /* start frame time stamp */
u16 interval; /* interval between trans. (for ISO/Intr) */
u32 status; /* status of the TD */ struct ed *ed; /* a handle to the corresponding ED */ struct urb *urb; /* a handle to the corresponding URB */ bool ioc; /* Inform On Completion */ struct list_head node;
/* read only parameters should be cleared upon initialization */ struct packet *pkt; int nak_cnt; int error_cnt; struct list_head frame_lh;
};
struct packet {
u8 *data; /* packet data */
u32 len; /* packet length */
u32 status; /* status of the packet - equivalent to the status
* field for the corresponding structure td */
u32 info; /* packet information */ void __iomem *priv_data; /* private data of the driver (TDs or BDs) */
};
/* struct for each URB */ #define URB_INPROGRESS 0 #define URB_DEL 1
/* three setup states */ #define US_CTRL_SETUP 2 #define US_CTRL_DATA 1 #define US_CTRL_ACK 0
#define EP_ZERO 0
struct urb_priv { int num_of_tds; int tds_cnt; int state;
struct td **tds; struct ed *ed; struct timer_list time_out;
};
struct endpoint { /* Pointer to ep parameter RAM */ struct fhci_ep_pram __iomem *ep_pram_ptr;
/* Host transactions */ struct usb_td __iomem *td_base; /* first TD in the ring */ struct usb_td __iomem *conf_td; /* next TD for confirm after transac */ struct usb_td __iomem *empty_td;/* next TD for new transaction req. */ struct kfifo empty_frame_Q; /* Empty frames list to use */ struct kfifo conf_frame_Q; /* frames passed to TDs,waiting for tx */ struct kfifo dummy_packets_Q;/* dummy packets for the CRC overun */
bool already_pushed_dummy_bd;
};
/* struct for each 1mSec frame time */ #define FRAME_IS_TRANSMITTED 0x00 #define FRAME_TIMER_END_TRANSMISSION 0x01 #define FRAME_DATA_END_TRANSMISSION 0x02 #define FRAME_END_TRANSMISSION 0x03 #define FRAME_IS_PREPARED 0x04
struct fhci_time_frame {
u16 frame_num; /* frame number */
u16 total_bytes; /* total bytes submitted within this frame */
u8 frame_status; /* flag that indicates to stop fill this frame */ struct list_head tds_list; /* all tds of this frame */
};
/* internal driver structure*/ struct fhci_usb {
u16 saved_msk; /* saving of the USB mask register */ struct endpoint *ep0; /* pointer for endpoint0 structure */ int intr_nesting_cnt; /* interrupt nesting counter */
u16 max_frame_usage; /* max frame time usage,in micro-sec */
u16 max_bytes_per_frame; /* max byte can be tx in one time frame */
u32 sw_transaction_time; /* sw complete trans time,in micro-sec */ struct fhci_time_frame *actual_frame; struct fhci_controller_list *hc_list; /* main structure for hc */ struct virtual_root_hub *vroot_hub; enum fhci_port_status port_status; /* v_rh port status */
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.49Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.