FreeBSD kernel usb device Code
|
Go to the source code of this file.
Data Structures | |
struct | uhci_td |
struct | uhci_qh |
struct | uhci_config_desc |
union | uhci_hub_desc |
struct | uhci_hw_softc |
struct | uhci_softc |
Macros | |
#define | UHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) |
#define | UHCI_FRAMELIST_COUNT 1024 /* units */ |
#define | UHCI_FRAMELIST_ALIGN 4096 /* bytes */ |
#define | UHCI_TD_ALIGN 16 |
#define | UHCI_QH_ALIGN 16 |
#define | UHCI_PTR_T 0x00000001 |
#define | UHCI_PTR_TD 0x00000000 |
#define | UHCI_PTR_QH 0x00000002 |
#define | UHCI_PTR_VF 0x00000004 |
#define | UHCI_TD_GET_ACTLEN(s) (((s) + 1) & 0x3ff) |
#define | UHCI_TD_ZERO_ACTLEN(t) ((t) | 0x3ff) |
#define | UHCI_TD_BITSTUFF 0x00020000 |
#define | UHCI_TD_CRCTO 0x00040000 |
#define | UHCI_TD_NAK 0x00080000 |
#define | UHCI_TD_BABBLE 0x00100000 |
#define | UHCI_TD_DBUFFER 0x00200000 |
#define | UHCI_TD_STALLED 0x00400000 |
#define | UHCI_TD_ACTIVE 0x00800000 |
#define | UHCI_TD_IOC 0x01000000 |
#define | UHCI_TD_IOS 0x02000000 |
#define | UHCI_TD_LS 0x04000000 |
#define | UHCI_TD_GET_ERRCNT(s) (((s) >> 27) & 3) |
#define | UHCI_TD_SET_ERRCNT(n) ((n) << 27) |
#define | UHCI_TD_SPD 0x20000000 |
#define | UHCI_TD_PID 0x000000ff |
#define | UHCI_TD_PID_IN 0x00000069 |
#define | UHCI_TD_PID_OUT 0x000000e1 |
#define | UHCI_TD_PID_SETUP 0x0000002d |
#define | UHCI_TD_GET_PID(s) ((s) & 0xff) |
#define | UHCI_TD_SET_DEVADDR(a) ((a) << 8) |
#define | UHCI_TD_GET_DEVADDR(s) (((s) >> 8) & 0x7f) |
#define | UHCI_TD_SET_ENDPT(e) (((e) & 0xf) << 15) |
#define | UHCI_TD_GET_ENDPT(s) (((s) >> 15) & 0xf) |
#define | UHCI_TD_SET_DT(t) ((t) << 19) |
#define | UHCI_TD_GET_DT(s) (((s) >> 19) & 1) |
#define | UHCI_TD_SET_MAXLEN(l) (((l)-1U) << 21) |
#define | UHCI_TD_GET_MAXLEN(s) ((((s) >> 21) + 1) & 0x7ff) |
#define | UHCI_TD_MAXLEN_MASK 0xffe00000 |
#define | UHCI_TD_ERROR |
#define | UHCI_TD_SETUP(len, endp, dev) |
#define | UHCI_TD_OUT(len, endp, dev, dt) |
#define | UHCI_TD_IN(len, endp, dev, dt) |
#define | UHCI_VFRAMELIST_COUNT 128 |
#define | UHCI_IFRAMELIST_COUNT (2 * UHCI_VFRAMELIST_COUNT) |
Typedefs | |
typedef uint32_t | uhci_physaddr_t |
typedef struct uhci_td | uhci_td_t |
typedef struct uhci_qh | uhci_qh_t |
typedef struct uhci_softc | uhci_softc_t |
Functions | |
struct uhci_td | __aligned (UHCI_TD_ALIGN) |
struct uhci_qh | __aligned (UHCI_QH_ALIGN) |
usb_error_t | uhci_init (uhci_softc_t *sc) |
void | uhci_reset (uhci_softc_t *sc) |
void | uhci_interrupt (uhci_softc_t *sc) |
Variables | |
volatile uint32_t | td_next |
volatile uint32_t | td_status |
volatile uint32_t | td_token |
volatile uint32_t | td_buffer |
struct uhci_td * | next |
struct uhci_td * | prev |
struct uhci_td * | obj_next |
struct usb_page_cache * | page_cache |
struct usb_page_cache * | fix_pc |
uint32_t | td_self |
uint16_t | len |
volatile uint32_t | qh_h_next |
volatile uint32_t | qh_e_next |
struct uhci_qh * | h_next |
struct uhci_qh * | h_prev |
struct uhci_td * | e_next |
uint32_t | qh_self |
uint16_t | intr_pos |
struct uhci_config_desc | __packed |
usb_bus_mem_cb_t | uhci_iterate_hw_softc |
#define UHCI_IFRAMELIST_COUNT (2 * UHCI_VFRAMELIST_COUNT) |
#define UHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128) |
#define UHCI_TD_ERROR |
typedef uint32_t uhci_physaddr_t |
typedef struct uhci_softc uhci_softc_t |
struct uhci_qh __aligned | ( | UHCI_QH_ALIGN | ) |
struct uhci_td __aligned | ( | UHCI_TD_ALIGN | ) |
usb_error_t uhci_init | ( | uhci_softc_t * | sc | ) |
Definition at line 450 of file uhci.c.
References usb_page_search::buffer, uhci_hw_softc::bulk_start_pc, usb_bus::bus_mtx, DPRINTF, uhci_qh::e_next, uhci_hw_softc::fs_ctl_start_pc, uhci_qh::h_next, uhci_hw_softc::intr_start_pc, uhci_hw_softc::isoc_start_pc, uhci_hw_softc::last_qh_pc, uhci_hw_softc::last_td_pc, uhci_hw_softc::ls_ctl_start_pc, usb_bus::methods, uhci_td::next, uhci_hw_softc::pframes_pc, uhci_qh::qh_e_next, uhci_qh::qh_h_next, uhci_qh::qh_self, uhci_softc::sc_bulk_p_last, uhci_softc::sc_bus, uhci_softc::sc_fs_ctl_p_last, uhci_softc::sc_hw, uhci_softc::sc_intr_p_last, uhci_softc::sc_isoc_p_last, uhci_softc::sc_last_qh_p, uhci_softc::sc_last_td_p, uhci_softc::sc_ls_ctl_p_last, uhci_softc::sc_reclaim_qh_p, uhci_softc::sc_root_intr, uhci_td::td_buffer, uhci_td::td_next, uhci_td::td_self, uhci_td::td_status, uhci_td::td_token, uhci_bus_methods, uhci_do_poll(), UHCI_FRAMELIST_COUNT, UHCI_IFRAMELIST_COUNT, uhci_init_qh(), uhci_init_td(), uhci_iterate_hw_softc(), UHCI_PTR_T, uhci_reset(), uhci_start(), UHCI_TD_IOS, UHCI_VFRAMELIST_COUNT, USB_BUS_LOCK, usb_bus_mem_flush_all(), USB_BUS_UNLOCK, usb_callout_init_mtx, and usbd_get_page().
Referenced by uhci_pci_attach().
void uhci_interrupt | ( | uhci_softc_t * | sc | ) |
Definition at line 1414 of file uhci.c.
References DPRINTF, uhci_softc::sc_bus, status, uhci_interrupt_poll(), UHCI_STS, UHCI_STS_ALLINTRS, UHCI_STS_HCH, UHCI_STS_HCPE, UHCI_STS_HSE, UHCI_STS_RD, UHCI_STS_USBEI, UHCI_STS_USBINT, UREAD2, USB_BUS_LOCK, USB_BUS_UNLOCK, and UWRITE2.
Referenced by uhci_pci_attach().
void uhci_reset | ( | uhci_softc_t * | sc | ) |
Definition at line 314 of file uhci.c.
References usb_bus::bdev, usb_bus::bus_mtx, DPRINTF, n, uhci_softc::sc_bus, uhci_softc::sc_root_intr, UHCI_CMD, UHCI_CMD_GRESET, UHCI_CMD_HCRESET, UHCI_FRNUM, UHCI_INTR, UHCI_RESET_TIMEOUT, UHCI_SOF, UHCI_STS, UHCI_STS_HCH, UHCICMD, UREAD2, USB_BUS_LOCK, USB_BUS_LOCK_ASSERT, USB_BUS_RESET_DELAY, USB_BUS_UNLOCK, usb_callout_drain, USB_MS_TO_TICKS, usb_pause_mtx(), UWRITE1, and UWRITE2.
Referenced by uhci_init(), uhci_pci_detach(), uhci_resume(), and uhci_suspend().
struct uhci_config_desc __packed |
struct usb_page_cache* fix_pc |
struct usb_page_cache* page_cache |
volatile uint32_t td_token |
Definition at line 21 of file uhci.h.
Referenced by uhci_check_transfer_sub(), and uhci_device_isoc_open().
usb_bus_mem_cb_t uhci_iterate_hw_softc |
Definition at line 245 of file uhci.h.
Referenced by uhci_pci_attach(), and uhci_pci_detach().