MCPcopy Create free account
hub / github.com/coreboot/coreboot / udelay

Function udelay

src/lib/timer.c:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7__weak void init_timer(void) { /* do nothing */ }
8
9void udelay(unsigned int usec)
10{
11 struct stopwatch sw;
12
13 /*
14 * As the timer granularity is in microseconds pad the
15 * requested delay by one to get at least >= requested usec delay.
16 */
17 usec += 1;
18
19 if (!thread_yield_microseconds(usec))
20 return;
21
22 stopwatch_init_usecs_expire(&sw, usec);
23 stopwatch_wait_until_expired(&sw);
24}

Callers 15

_gpio_base2_valueFunction · 0.70
_gpio_base3_valueFunction · 0.70
reg_script_run_stepFunction · 0.70
mdelayFunction · 0.70
bdk_wait_usecFunction · 0.50
opal_trusted_recvFunction · 0.50
tps65090_fet_setFunction · 0.50
tps65090_fet_enableFunction · 0.50
tis_wait_stsFunction · 0.50
tis_wait_accessFunction · 0.50
tis_senddataFunction · 0.50
tis_readresponseFunction · 0.50

Calls 3

Tested by

no test coverage detected