Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hc.c

    re6b9182 r8d2dd7f2  
    4747#include <usb/usb.h>
    4848
    49 #include "ohci_bus.h"
     49#include "ohci_endpoint.h"
    5050#include "ohci_batch.h"
    5151
     
    8989};
    9090
     91static void hc_gain_control(hc_t *instance);
     92static void hc_start(hc_t *instance);
    9193static int hc_init_transfer_lists(hc_t *instance);
    9294static int hc_init_memory(hc_t *instance);
     
    101103 * @return Error code.
    102104 */
    103 int ohci_hc_gen_irq_code(irq_code_t *code, hcd_t *hcd, const hw_res_list_parsed_t *hw_res)
     105int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)
    104106{
    105107        assert(code);
     
    149151 * @return Error code
    150152 */
    151 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res)
     153int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)
    152154{
    153155        assert(instance);
     
    170172        list_initialize(&instance->pending_batches);
    171173        fibril_mutex_initialize(&instance->guard);
     174        instance->hw_interrupts = interrupts;
    172175
    173176        ret = hc_init_memory(instance);
     
    178181                return ret;
    179182        }
     183
     184        hc_gain_control(instance);
     185
     186        ohci_rh_init(&instance->rh, instance->registers, "ohci rh");
     187        hc_start(instance);
    180188
    181189        return EOK;
     
    287295
    288296        /* 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)) {
    290298                usb_log_debug("OHCI root hub request.\n");
    291299                return ohci_rh_schedule(&instance->rh, batch);
     
    435443void hc_start(hc_t *instance)
    436444{
    437         ohci_rh_init(&instance->rh, instance->registers, "ohci rh");
    438 
    439445        /* OHCI guide page 42 */
    440446        assert(instance);
Note: See TracChangeset for help on using the changeset viewer.