Changes in uspace/drv/bus/usb/ohci/hc.h [ae3a941:b7fd2a0] in mainline
- File:
-
- 1 edited
-
uspace/drv/bus/usb/ohci/hc.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/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 * … … 53 52 #include "ohci_regs.h" 54 53 #include "ohci_rh.h" 55 #include "ohci_bus.h"56 54 #include "endpoint_list.h" 57 55 #include "hw_struct/hcca.h" … … 59 57 /** Main OHCI driver structure */ 60 58 typedef struct hc { 61 /** Common hcd header */62 hc_device_t base;63 64 59 /** Memory mapped I/O registers area */ 65 60 ohci_regs_t *registers; 66 67 61 /** Host controller communication area structure */ 68 62 hcca_t *hcca; … … 70 64 /** Transfer schedules */ 71 65 endpoint_list_t lists[4]; 66 /** List of active transfers */ 67 list_t pending_batches; 72 68 73 /** List of active endpoints*/74 list_t pending_endpoints;69 /** Fibril for periodic checks if interrupts can't be used */ 70 fid_t interrupt_emulator; 75 71 76 72 /** Guards schedule and endpoint manipulation */ 77 73 fibril_mutex_t guard; 78 74 75 /** interrupts available */ 76 bool hw_interrupts; 77 79 78 /** USB hub emulation structure */ 80 79 ohci_rh_t rh; 81 82 /** USB bookkeeping */83 ohci_bus_t bus;84 80 } hc_t; 85 81 86 static inline hc_t *hcd_to_hc(hc_device_t *hcd) 87 { 88 assert(hcd); 89 return (hc_t *) hcd; 90 } 91 92 extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *); 93 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, 94 const hw_res_list_parsed_t *, int *); 95 extern errno_t hc_gain_control(hc_device_t *); 96 extern errno_t hc_start(hc_device_t *); 97 extern errno_t hc_setup_roothub(hc_device_t *); 98 extern errno_t hc_gone(hc_device_t *); 82 extern errno_t hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 83 extern void hc_fini(hc_t *); 99 84 100 85 extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *); 101 86 extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *); 102 87 103 extern errno_t ohci_hc_schedule(usb_transfer_batch_t *); 104 extern errno_t ohci_hc_status(bus_t *, uint32_t *); 105 extern void ohci_hc_interrupt(bus_t *, uint32_t); 88 errno_t ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq); 89 90 extern void ohci_hc_interrupt(hcd_t *, uint32_t); 91 extern errno_t ohci_hc_status(hcd_t *, uint32_t *); 92 extern errno_t ohci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 106 93 107 94 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
