Changes in uspace/drv/bus/usb/ehci/hc.h [ae3a941:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hc.h
rae3a941 rb7fd2a0 1 1 /* 2 2 * Copyright (c) 2011 Jan Vesely 3 * Copyright (c) 2018 Ondrej Hlavaty4 3 * All rights reserved. 5 4 * … … 56 55 /** Main EHCI driver structure */ 57 56 typedef struct hc { 58 /* Common device header */59 hc_device_t base;60 61 57 /** Memory mapped CAPS register area */ 62 58 ehci_caps_regs_t *caps; … … 64 60 ehci_regs_t *registers; 65 61 66 /** Iso transfer list, backed by dma_buffer */ 67 link_pointer_t *periodic_list; 68 69 dma_buffer_t dma_buffer; 62 /** Iso transfer list */ 63 link_pointer_t *periodic_list_base; 70 64 71 65 /** CONTROL and BULK schedules */ … … 76 70 77 71 /** List of active transfers */ 78 list_t pending_ endpoints;72 list_t pending_batches; 79 73 80 74 /** Guards schedule and endpoint manipulation */ … … 86 80 /** USB hub emulation structure */ 87 81 ehci_rh_t rh; 88 89 /** USB bookkeeping */90 ehci_bus_t bus;91 82 } hc_t; 92 83 93 static inline hc_t *hcd_to_hc(hc_device_t *hcd) 94 { 95 assert(hcd); 96 return (hc_t *) hcd; 97 } 84 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts); 85 void hc_fini(hc_t *instance); 98 86 99 void hc_enqueue_endpoint(hc_t * , const endpoint_t *);100 void hc_dequeue_endpoint(hc_t * , const endpoint_t *);87 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep); 88 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep); 101 89 102 /* Boottime operations */ 103 extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *); 104 extern errno_t hc_start(hc_device_t *); 105 extern errno_t hc_setup_roothub(hc_device_t *); 106 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, 107 const hw_res_list_parsed_t *, int *); 108 extern errno_t hc_gone(hc_device_t *); 90 errno_t ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq); 109 91 110 /** Runtime operations */ 111 extern void ehci_hc_interrupt(bus_t *, uint32_t); 112 extern errno_t ehci_hc_status(bus_t *, uint32_t *); 113 extern errno_t ehci_hc_schedule(usb_transfer_batch_t *); 114 92 void ehci_hc_interrupt(hcd_t *hcd, uint32_t status); 93 errno_t ehci_hc_status(hcd_t *hcd, uint32_t *status); 94 errno_t ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch); 115 95 #endif 116 96 /**
Note:
See TracChangeset
for help on using the changeset viewer.