Home | History | Annotate | Download | only in at91

Lines Matching refs:usec

105     /* convert specified number of ticks to usec, and round up  */
120 /* it will be used when usec < USEC_PER_TICK */
121 static uint32_t usec_to_timer_count(uint32_t usec)
125 /* convert specified number of usec to timer ticks, and round up */
126 result = (AT91_SCLK * usec) / 1000000;
128 if ((result * 1000000) != (usec * AT91_SCLK))
250 static void udelay(unsigned int usec);
307 /* Refine the usec field using current timer count */
350 static void udelay(unsigned int usec)
355 usec = (usec * 1000 + AT91_SCLK - 1) / AT91_SCLK + 1;
360 if (diff >= usec) {
364 usec -= diff;
378 delay(unsigned int usec)
388 if (usec >= USEC_PER_TICK)
391 unsigned int ticks = usec / USEC_PER_TICK;
392 if (ticks*USEC_PER_TICK != usec)
400 /* less than 1 tick; can do as usec */
401 udelay(usec);