Changeset c9d905f in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-09-30T13:16:18Z (7 years ago)
Author:
jenda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d28d86
Parents:
e6b0dba
Message:

macros for handoff delay

File:
1 edited

Legend:

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

    re6b0dba rc9d905f  
    327327        usb_log_debug2("LEGSUP: bios: %x, os: %x", hc->legsup->sem_bios, hc->legsup->sem_os);
    328328        XHCI_REG_WR(hc->legsup, XHCI_LEGSUP_SEM_OS, 1);
    329         for (int i = 0; i<1001; i++) {
     329        for (int i = 0; i<=(XHCI_LEGSUP_BIOS_TIMEOUT_US/XHCI_LEGSUP_POLLING_DELAY_1MS); i++) {
    330330                usb_log_debug2("LEGSUP: elapsed: %i ms, bios: %x, os: %x", i,
    331331                        XHCI_REG_RD(hc->legsup, XHCI_LEGSUP_SEM_BIOS),
     
    335335                        return EOK;
    336336                }
    337                 async_usleep(1000);
     337                async_usleep(XHCI_LEGSUP_POLLING_DELAY_1MS);
    338338        }
    339339        usb_log_error("BIOS did not release XHCI legacy hold!\n");
Note: See TracChangeset for help on using the changeset viewer.