/* Convert the poll interval from application to that be used by EHCI interface data structure. Only need to get the max 2^n that is less than interval. UEFI can't support high speed endpoint with a interval less than 8 microframe because interval is specified in the unit of ms (millisecond). */
UINTN EhcConvertPollRate(IN UINTN Interval)
/* Convert the poll interval from application to that be used by EHCI interface data structure. Only need to get the max 2^n that is less than interval. UEFI can't support high speed endpoint with a interval less than 8 microframe because interval is specified in the unit of ms (millisecond). */
UINTN EhcConvertPollRate(IN UINTN Interval)
{
  UINTN  BitCount;
  if (Interval == 0) {
    return 1;
  }
  BitCount = 0;
  while (Interval != 0) {
    Interval >>= 1;
    BitCount++;
  }
  return (UINTN)1 << (BitCount - 1);
}