Changeset df6ded8 in mainline for uspace/drv/bus/usb/ohci/hc.h
- Timestamp:
- 2018-02-28T16:37:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b20da0
- Parents:
- f5e5f73 (diff), b2dca8de (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. - git-author:
- Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
- git-committer:
- Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.h
rf5e5f73 rdf6ded8 1 1 /* 2 2 * Copyright (c) 2011 Jan Vesely 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 52 53 #include "ohci_regs.h" 53 54 #include "ohci_rh.h" 55 #include "ohci_bus.h" 54 56 #include "endpoint_list.h" 55 57 #include "hw_struct/hcca.h" … … 57 59 /** Main OHCI driver structure */ 58 60 typedef struct hc { 61 /** Common hcd header */ 62 hc_device_t base; 63 59 64 /** Memory mapped I/O registers area */ 60 65 ohci_regs_t *registers; 66 61 67 /** Host controller communication area structure */ 62 68 hcca_t *hcca; … … 64 70 /** Transfer schedules */ 65 71 endpoint_list_t lists[4]; 66 /** List of active transfers */67 list_t pending_batches;68 72 69 /** Fibril for periodic checks if interrupts can't be used*/70 fid_t interrupt_emulator;73 /** List of active endpoints */ 74 list_t pending_endpoints; 71 75 72 76 /** Guards schedule and endpoint manipulation */ 73 77 fibril_mutex_t guard; 74 78 75 /** interrupts available */76 bool hw_interrupts;77 78 79 /** USB hub emulation structure */ 79 80 ohci_rh_t rh; 81 82 /** USB bookkeeping */ 83 ohci_bus_t bus; 80 84 } hc_t; 81 85 82 extern errno_t hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 83 extern void hc_fini(hc_t *); 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 *); 84 99 85 100 extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *); 86 101 extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *); 87 102 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 *); 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); 93 106 94 107 #endif
Note:
See TracChangeset
for help on using the changeset viewer.