Ignore:
File:
1 edited

Legend:

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

    r8d2dd7f2 re6b9182  
    4747#include <usb/usb.h>
    4848
    49 #include "ohci_endpoint.h"
     49#include "ohci_bus.h"
    5050#include "ohci_batch.h"
    5151
     
    8989};
    9090
    91 static void hc_gain_control(hc_t *instance);
    92 static void hc_start(hc_t *instance);
    9391static int hc_init_transfer_lists(hc_t *instance);
    9492static int hc_init_memory(hc_t *instance);
     
    103101 * @return Error code.
    104102 */
    105 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)
     103int ohci_hc_gen_irq_code(irq_code_t *code, hcd_t *hcd, const hw_res_list_parsed_t *hw_res)
    106104{
    107105        assert(code);
     
    151149 * @return Error code
    152150 */
    153 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts)
     151int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res)
    154152{
    155153        assert(instance);
     
    172170        list_initialize(&instance->pending_batches);
    173171        fibril_mutex_initialize(&instance->guard);
    174         instance->hw_interrupts = interrupts;
    175172
    176173        ret = hc_init_memory(instance);
     
    181178                return ret;
    182179        }
    183 
    184         hc_gain_control(instance);
    185 
    186         ohci_rh_init(&instance->rh, instance->registers, "ohci rh");
    187         hc_start(instance);
    188180
    189181        return EOK;
     
    295287
    296288        /* Check for root hub communication */
    297         if (batch->ep->address == ohci_rh_get_address(&instance->rh)) {
     289        if (batch->ep->target.address == ohci_rh_get_address(&instance->rh)) {
    298290                usb_log_debug("OHCI root hub request.\n");
    299291                return ohci_rh_schedule(&instance->rh, batch);
     
    443435void hc_start(hc_t *instance)
    444436{
     437        ohci_rh_init(&instance->rh, instance->registers, "ohci rh");
     438
    445439        /* OHCI guide page 42 */
    446440        assert(instance);
Note: See TracChangeset for help on using the changeset viewer.