Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f1d16663 in mainline


Ignore:
Timestamp:
2011-05-07T08:45:37Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
bba0dc20
Parents:
9350e837
Message:

Postpone hw until all structures are initialized and irq handler registered

remove dead code
remove initial 5s wait

Location:
uspace/drv/ohci
Files:
5 edited

Legend:

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

    r9350e837 rf1d16663  
    4949static int interrupt_emulator(hc_t *instance);
    5050static void hc_gain_control(hc_t *instance);
    51 static void hc_init_hw(hc_t *instance);
    5251static int hc_init_transfer_lists(hc_t *instance);
    5352static int hc_init_memory(hc_t *instance);
     
    121120        CHECK_RET_RETURN(ret, "Failed to create OHCI memory structures: %s.\n",
    122121            str_error(ret));
    123         hc_init_hw(instance);
     122//      hc_init_hw(instance);
    124123        fibril_mutex_initialize(&instance->guard);
    125124
     
    375374}
    376375/*----------------------------------------------------------------------------*/
    377 void hc_init_hw(hc_t *instance)
     376void hc_start_hw(hc_t *instance)
    378377{
    379378        /* OHCI guide page 42 */
  • uspace/drv/ohci/hc.h

    r9350e837 rf1d16663  
    8080     uintptr_t regs, size_t reg_size, bool interrupts);
    8181
     82void hc_start_hw(hc_t *instance);
     83
    8284/** Safely dispose host controller internal structures
    8385 *
  • uspace/drv/ohci/main.c

    r9350e837 rf1d16663  
    9393{
    9494        usb_log_enable(USB_LOG_LEVEL_DEFAULT, NAME);
    95         sleep(5);
    9695        return ddf_driver_main(&ohci_driver);
    9796}
  • uspace/drv/ohci/ohci.c

    r9350e837 rf1d16663  
    152152        usb_log_debug("Memory mapped regs at %p (size %zu), IRQ %d.\n",
    153153            (void *) mem_reg_base, mem_reg_size, irq);
    154 
    155         ret = pci_disable_legacy(device);
    156         CHECK_RET_DEST_FUN_RETURN(ret,
    157             "Failed(%d) to disable legacy USB: %s.\n", ret, str_error(ret));
    158154
    159155        bool interrupts = false;
     
    220216            "Failed(%d) to register OHCI root hub.\n", ret);
    221217
     218        hc_start_hw(&instance->hc);
    222219        return EOK;
    223220#undef CHECK_RET_FINI_RETURN
  • uspace/drv/ohci/pci.c

    r9350e837 rf1d16663  
    136136        return enabled ? EOK : EIO;
    137137}
    138 /*----------------------------------------------------------------------------*/
    139 /** Implements BIOS handoff routine as decribed in OHCI spec
    140  *
    141  * @param[in] device Device asking for interrupts
    142  * @return Error code.
    143  */
    144 int pci_disable_legacy(ddf_dev_t *device)
    145 {
    146         /* TODO: implement */
    147         return EOK;
    148 }
    149 /*----------------------------------------------------------------------------*/
    150138/**
    151139 * @}
Note: See TracChangeset for help on using the changeset viewer.