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

Function wait_for_scl

src/device/software_i2c.c:61–70  ·  view source on GitHub ↗

Waits until SCL goes high. Prints a contextual error message on timeout. */

Source from the content-addressed store, hash-verified

59
60/* Waits until SCL goes high. Prints a contextual error message on timeout. */
61static int wait_for_scl(unsigned int bus, const char *error_context)
62{
63 if (!__wait(bus, TIMEOUT_US, 1)) {
64 printk(BIOS_ERR, "software_i2c(%d): ERROR: Clock stretching "
65 "timeout %s!\n", bus, error_context);
66 return ERR_TIMEOUT;
67 }
68
69 return 0;
70}
71
72static int start_cond(unsigned int bus)
73{

Callers 7

start_condFunction · 0.85
stop_condFunction · 0.85
out_bitFunction · 0.85
in_bitFunction · 0.85
software_i2c_wedge_ackFunction · 0.85
software_i2c_wedge_readFunction · 0.85
software_i2c_wedge_writeFunction · 0.85

Calls 2

__waitFunction · 0.85
printkFunction · 0.50

Tested by

no test coverage detected