Changeset b4b534ac in mainline for uspace/drv/bus/usb/uhci/uhci_rh.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/uhci_rh.h
r5b18137 rb4b534ac 1 1 /* 2 * Copyright (c) 201 1Jan Vesely2 * Copyright (c) 2013 Jan Vesely 3 3 * All rights reserved. 4 4 * … … 31 31 */ 32 32 /** @file 33 * @brief UHCI driver33 * @brief UHCI host controller driver structure 34 34 */ 35 #ifndef DRV_UHCI_ RH_H36 #define DRV_UHCI_ RH_H35 #ifndef DRV_UHCI_UHCI_RH_H 36 #define DRV_UHCI_UHCI_RH_H 37 37 38 #include < ddf/driver.h>39 #include < ops/hw_res.h>40 #include < ops/pio_window.h>38 #include <usbvirt/virthub_base.h> 39 #include <usb/host/usb_transfer_batch.h> 40 #include <usb/usb.h> 41 41 42 /** DDF support structure for uhci_rhd driver, provides I/O resources */ 43 typedef struct rh { 44 /** List of resources available to the root hub. */ 45 hw_resource_list_t resource_list; 46 /** The only resource in the RH resource list */ 47 hw_resource_t io_regs; 48 /** PIO window in which the RH will operate. */ 49 pio_window_t pio_window; 50 } rh_t; 42 #include <stdbool.h> 43 #include <sys/types.h> 51 44 52 extern int rh_init(rh_t *, ddf_fun_t *, addr_range_t *, uintptr_t, size_t); 45 /** Endpoint number for status change pipe. */ 46 #define HUB_STATUS_CHANGE_PIPE 1 47 48 /** Virtual to UHCI hub connector */ 49 typedef struct { 50 /** Virtual hub software implementation */ 51 virthub_base_t base; 52 /** UHCI root hub port io registers */ 53 ioport16_t *ports[2]; 54 /** Reset change indicator, it is not reported by regs */ 55 bool reset_changed[2]; 56 } uhci_rh_t; 57 58 int uhci_rh_init(uhci_rh_t *instance, ioport16_t *ports, const char *name); 59 int uhci_rh_schedule(uhci_rh_t *instance, usb_transfer_batch_t *batch); 60 61 /** Get UHCI rh address. 62 * 63 * @param instance UHCI rh instance. 64 * @return USB address assigned to the hub. 65 * Wrapper for virtual hub address 66 */ 67 static inline usb_address_t uhci_rh_get_address(uhci_rh_t *instance) 68 { 69 return virthub_base_get_address(&instance->base); 70 } 53 71 54 72 #endif
Note:
See TracChangeset
for help on using the changeset viewer.