|
Files |
file | main.c |
| UHCI root hub initialization routines.
|
file | port.c |
| UHCI root hub port routines.
|
file | port.h |
| UHCI root hub port routines.
|
file | root_hub.c |
| UHCI root hub driver.
|
file | root_hub.h |
| UHCI driver.
|
Data Structures |
struct | root_hub |
| UHCI root hub drvier structure. More...
|
struct | uhci_port |
| UHCI port structure. More...
|
Defines |
#define | NAME "uhci-rhd" |
#define | ROOT_HUB_WAIT_USEC 250000 |
#define | STATUS_ALWAYS_ONE (1 << 7) |
#define | STATUS_CONNECTED (1 << 0) |
#define | STATUS_CONNECTED_CHANGED (1 << 1) |
#define | STATUS_ENABLED (1 << 2) |
#define | STATUS_ENABLED_CHANGED (1 << 3) |
#define | STATUS_IN_RESET (1 << 9) |
#define | STATUS_LINE_D_MINUS (1 << 5) |
#define | STATUS_LINE_D_PLUS (1 << 4) |
#define | STATUS_LOW_SPEED (1 << 8) |
#define | STATUS_RESUME (1 << 6) |
#define | STATUS_SUSPEND (1 << 12) |
#define | UHCI_ROOT_HUB_PORT_COUNT 2 |
Typedefs |
typedef uint16_t | port_status_t |
typedef uhci_port | uhci_port_t |
| UHCI port structure.
|
typedef root_hub | uhci_root_hub_t |
| UHCI root hub drvier structure.
|
Functions |
static int | hc_get_my_registers (const ddf_dev_t *dev, uintptr_t *io_reg_address, size_t *io_reg_size) |
| Get address of I/O registers.
|
int | main (int argc, char *argv[]) |
| Main entry point.
|
static int | uhci_port_check (void *port) |
| Periodically checks port status and reports new devices.
|
void | uhci_port_fini (uhci_port_t *port) |
| Cleanup UHCI root hub port instance.
|
int | uhci_port_init (uhci_port_t *port, port_status_t *address, unsigned number, unsigned usec, ddf_dev_t *rh) |
| Initialize UHCI root hub port instance.
|
static int | uhci_port_new_device (uhci_port_t *port, usb_speed_t speed) |
| Initialize and report connected device.
|
static void | uhci_port_print_status (uhci_port_t *port, const port_status_t value) |
| Print the port status value in a human friendly way.
|
static port_status_t | uhci_port_read_status (uhci_port_t *port) |
| Register reading helper function.
|
static int | uhci_port_remove_device (uhci_port_t *port) |
| Remove device.
|
static int | uhci_port_reset_enable (int portno, void *arg) |
| Callback for enabling port during adding a new device.
|
static int | uhci_port_set_enabled (uhci_port_t *port, bool enabled) |
| Enable or disable root hub port.
|
static void | uhci_port_write_status (uhci_port_t *port, port_status_t val) |
| Register writing helper function.
|
static int | uhci_rh_add_device (ddf_dev_t *device) |
| Initialize a new ddf driver instance of UHCI root hub.
|
void | uhci_root_hub_fini (uhci_root_hub_t *instance) |
| Cleanup UHCI root hub instance.
|
int | uhci_root_hub_init (uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh) |
| Initialize UHCI root hub instance.
|
Variables |
static driver_t | uhci_rh_driver |
static driver_ops_t | uhci_rh_driver_ops |