Changeset 58563585 in mainline for uspace/drv/bus/usb/ohci
- Timestamp:
- 2016-08-31T11:15:39Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 10cb47e
- Parents:
- 7a67416
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 14 edited
-
endpoint_list.h (modified) (1 diff)
-
hc.c (modified) (3 diffs)
-
hc.h (modified) (3 diffs)
-
hw_struct/completion_codes.h (modified) (1 diff)
-
hw_struct/endpoint_descriptor.c (modified) (1 diff)
-
hw_struct/hcca.h (modified) (3 diffs)
-
hw_struct/iso_transfer_descriptor.h (modified) (3 diffs)
-
hw_struct/mem_access.h (modified) (2 diffs)
-
hw_struct/transfer_descriptor.c (modified) (1 diff)
-
hw_struct/transfer_descriptor.h (modified) (3 diffs)
-
main.c (modified) (2 diffs)
-
ohci_batch.c (modified) (1 diff)
-
ohci_endpoint.c (modified) (2 diffs)
-
ohci_regs.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/endpoint_list.h
r7a67416 r58563585 76 76 void endpoint_list_add_ep(endpoint_list_t *instance, ohci_endpoint_t *ep); 77 77 void endpoint_list_remove_ep(endpoint_list_t *instance, ohci_endpoint_t *ep); 78 78 79 #endif 80 79 81 /** 80 82 * @} -
uspace/drv/bus/usb/ohci/hc.c
r7a67416 r58563585 177 177 usb_log_error("Failed to create OHCI memory structures: %s.\n", 178 178 str_error(ret)); 179 // TODO: We should disable pio access here179 // TODO: We should disable pio access here 180 180 return ret; 181 181 } … … 393 393 ohci_emulation_reg, OHCI_RD(*ohci_emulation_reg)); 394 394 /* Zero everything but A20State */ 395 // TODO: should we ack interrupts before doing this?395 // TODO: should we ack interrupts before doing this? 396 396 OHCI_CLR(*ohci_emulation_reg, ~0x100); 397 397 usb_log_debug( … … 403 403 if (OHCI_RD(instance->registers->control) & C_IR) { 404 404 usb_log_debug("SMM driver: request ownership change.\n"); 405 // TODO: should we ack interrupts before doing this?405 // TODO: should we ack interrupts before doing this? 406 406 OHCI_SET(instance->registers->command_status, CS_OCR); 407 407 /* Hope that SMM actually knows its stuff or we can hang here */ -
uspace/drv/bus/usb/ohci/hc.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI host controller driver structure 33 34 */ 35 34 36 #ifndef DRV_OHCI_HC_H 35 37 #define DRV_OHCI_HC_H … … 78 80 } hc_t; 79 81 80 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);81 void hc_fini(hc_t *instance);82 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 83 extern void hc_fini(hc_t *); 82 84 83 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);84 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);85 extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *); 86 extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *); 85 87 86 88 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res); 87 89 88 void ohci_hc_interrupt(hcd_t *hcd, uint32_t status); 89 int ohci_hc_status(hcd_t *hcd, uint32_t *status); 90 int ohci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch); 90 extern void ohci_hc_interrupt(hcd_t *, uint32_t); 91 extern int ohci_hc_status(hcd_t *, uint32_t *); 92 extern int ohci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 93 91 94 #endif 95 92 96 /** 93 97 * @} -
uspace/drv/bus/usb/ohci/hw_struct/completion_codes.h
r7a67416 r58563585 54 54 }; 55 55 56 inline static unsigned cc_to_rc(unsignedcc)56 inline static unsigned int cc_to_rc(unsigned int cc) 57 57 { 58 58 switch (cc) { -
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ -
uspace/drv/bus/usb/ohci/hw_struct/hcca.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI driver 33 34 */ 35 34 36 #ifndef DRV_OHCI_HW_STRUCT_HCCA_H 35 37 #define DRV_OHCI_HW_STRUCT_HCCA_H … … 85 87 OHCI_MEM32_WR(hcca->int_ep[index], pa); 86 88 } 89 87 90 #endif 91 88 92 /** 89 93 * @} -
uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI driver 33 34 */ 35 34 36 #ifndef DRV_OHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H 35 37 #define DRV_OHCI_HW_STRUCT_ISO_TRANSFER_DESCRIPTOR_H … … 68 70 69 71 } __attribute__((packed)) itd_t; 72 70 73 #endif 74 71 75 /** 72 76 * @} -
uspace/drv/bus/usb/ohci/hw_struct/mem_access.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI driver 33 34 */ 35 34 36 #ifndef DRV_OHCI_HW_MEM_ACCESS_H 35 37 #define DRV_OHCI_HW_MEM_ACCESS_H -
uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ -
uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI driver 33 34 */ 35 34 36 #ifndef DRV_OHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H 35 37 #define DRV_OHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H … … 139 141 return OHCI_MEM32_RD(instance->be) - OHCI_MEM32_RD(instance->cbp) + 1; 140 142 } 143 141 144 #endif 145 142 146 /** 143 147 * @} -
uspace/drv/bus/usb/ohci/main.c
r7a67416 r58563585 27 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 */ 29 29 30 /** @addtogroup drvusbohci 30 31 * @{ … … 128 129 return ddf_driver_main(&ohci_driver); 129 130 } 131 130 132 /** 131 133 * @} -
uspace/drv/bus/usb/ohci/ohci_batch.c
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ -
uspace/drv/bus/usb/ohci/ohci_endpoint.c
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 117 118 } 118 119 } 120 119 121 /** 120 122 * @} -
uspace/drv/bus/usb/ohci/ohci_regs.h
r7a67416 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI host controller register structure 33 34 */ 35 34 36 #ifndef DRV_OHCI_OHCI_REGS_H 35 37 #define DRV_OHCI_OHCI_REGS_H 38 36 39 #include <ddi.h> 37 40 #include <sys/types.h> … … 246 249 #define RHPS_CHANGE_WC_MASK (0x1f0000) 247 250 } ohci_regs_t; 251 248 252 #endif 253 249 254 /** 250 255 * @}
Note:
See TracChangeset
for help on using the changeset viewer.
