Changes in uspace/drv/bus/usb/ohci/hc.c [e6b9182:8d2dd7f2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
re6b9182 r8d2dd7f2 47 47 #include <usb/usb.h> 48 48 49 #include "ohci_ bus.h"49 #include "ohci_endpoint.h" 50 50 #include "ohci_batch.h" 51 51 … … 89 89 }; 90 90 91 static void hc_gain_control(hc_t *instance); 92 static void hc_start(hc_t *instance); 91 93 static int hc_init_transfer_lists(hc_t *instance); 92 94 static int hc_init_memory(hc_t *instance); … … 101 103 * @return Error code. 102 104 */ 103 int ohci_hc_gen_irq_code(irq_code_t *code, hcd_t *hcd,const hw_res_list_parsed_t *hw_res)105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res) 104 106 { 105 107 assert(code); … … 149 151 * @return Error code 150 152 */ 151 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res )153 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts) 152 154 { 153 155 assert(instance); … … 170 172 list_initialize(&instance->pending_batches); 171 173 fibril_mutex_initialize(&instance->guard); 174 instance->hw_interrupts = interrupts; 172 175 173 176 ret = hc_init_memory(instance); … … 178 181 return ret; 179 182 } 183 184 hc_gain_control(instance); 185 186 ohci_rh_init(&instance->rh, instance->registers, "ohci rh"); 187 hc_start(instance); 180 188 181 189 return EOK; … … 287 295 288 296 /* Check for root hub communication */ 289 if (batch->ep-> target.address == ohci_rh_get_address(&instance->rh)) {297 if (batch->ep->address == ohci_rh_get_address(&instance->rh)) { 290 298 usb_log_debug("OHCI root hub request.\n"); 291 299 return ohci_rh_schedule(&instance->rh, batch); … … 435 443 void hc_start(hc_t *instance) 436 444 { 437 ohci_rh_init(&instance->rh, instance->registers, "ohci rh");438 439 445 /* OHCI guide page 42 */ 440 446 assert(instance);
Note:
See TracChangeset
for help on using the changeset viewer.