Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ichiic/ig4_iic.c
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static int | static int | ||||
wait_intr(ig4iic_softc_t *sc, uint32_t intr) | wait_intr(ig4iic_softc_t *sc, uint32_t intr) | ||||
{ | { | ||||
uint32_t v; | uint32_t v; | ||||
int error; | int error; | ||||
int txlvl = -1; | int txlvl = -1; | ||||
u_int count_us = 0; | u_int count_us = 0; | ||||
u_int limit_us = 25000; /* 25ms */ | u_int limit_us = 1000000; /* 1sec */ | ||||
for (;;) { | for (;;) { | ||||
/* | /* | ||||
* Check requested status | * Check requested status | ||||
*/ | */ | ||||
v = reg_read(sc, IG4_REG_RAW_INTR_STAT); | v = reg_read(sc, IG4_REG_RAW_INTR_STAT); | ||||
error = intrstat2iic(sc, v & IG4_INTR_ERR_MASK); | error = intrstat2iic(sc, v & IG4_INTR_ERR_MASK); | ||||
if (error || (v & intr)) | if (error || (v & intr)) | ||||
▲ Show 20 Lines • Show All 937 Lines • Show Last 20 Lines |