summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/i2c/rx6110sa/rx6110sa.c3
-rw-r--r--src/ec/google/chromeec/ec_spi.c5
-rw-r--r--src/lib/timer.c4
-rw-r--r--src/mainboard/google/oak/romstage.c3
-rw-r--r--src/mainboard/siemens/mc_apl1/mainboard.c3
5 files changed, 7 insertions, 11 deletions
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c
index aad109781d..69ea9fec0f 100644
--- a/src/drivers/i2c/rx6110sa/rx6110sa.c
+++ b/src/drivers/i2c/rx6110sa/rx6110sa.c
@@ -149,8 +149,7 @@ static void rx6110sa_init(struct device *dev)
* Take the needed delay after a reset sequence into account before the
* VLF-bit can be cleared.
*/
- while (!stopwatch_expired(&sw))
- ;
+ stopwatch_wait_until_expired(&sw);
flags &= ~VLF_BIT;
rx6110sa_write(dev, FLAG_REGISTER, flags);
diff --git a/src/ec/google/chromeec/ec_spi.c b/src/ec/google/chromeec/ec_spi.c
index 810979ed49..3611814b66 100644
--- a/src/ec/google/chromeec/ec_spi.c
+++ b/src/ec/google/chromeec/ec_spi.c
@@ -51,8 +51,9 @@ static int crosec_spi_io(size_t req_size, size_t resp_size, void *context)
struct spi_slave *slave = (struct spi_slave *)context;
int ret = 0;
- while (!stopwatch_expired(&cs_cooldown_sw))
- /* Wait minimum delay between CS assertions. */;
+ /* Wait minimum delay between CS assertions. */
+ stopwatch_wait_until_expired(&cs_cooldown_sw);
+
spi_claim_bus(slave);
/* Allow EC to ramp up clock after being awaken.
diff --git a/src/lib/timer.c b/src/lib/timer.c
index 58d32ee8e4..adc0d07cef 100644
--- a/src/lib/timer.c
+++ b/src/lib/timer.c
@@ -34,7 +34,5 @@ void udelay(unsigned int usec)
return;
stopwatch_init_usecs_expire(&sw, usec);
-
- while (!stopwatch_expired(&sw))
- ;
+ stopwatch_wait_until_expired(&sw);
}
diff --git a/src/mainboard/google/oak/romstage.c b/src/mainboard/google/oak/romstage.c
index a92e4fb7c6..1f5654748b 100644
--- a/src/mainboard/google/oak/romstage.c
+++ b/src/mainboard/google/oak/romstage.c
@@ -55,8 +55,7 @@ void main(void)
/* init memory */
mt_mem_init(get_sdram_config());
- while (!stopwatch_expired(&sw))
- ;
+ stopwatch_wait_until_expired(&sw);
/* Set to maximum frequency */
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c
index fb849f9872..f77ef75d3e 100644
--- a/src/mainboard/siemens/mc_apl1/mainboard.c
+++ b/src/mainboard/siemens/mc_apl1/mainboard.c
@@ -165,8 +165,7 @@ static void wait_for_legacy_dev(void *unused)
stopwatch_init_msecs_expire(&sw, (legacy_delay - us_since_boot) / 1000);
printk(BIOS_NOTICE, "Wait remaining %d of %d us for legacy devices...",
legacy_delay - us_since_boot, legacy_delay);
- while (!stopwatch_expired(&sw))
- ;
+ stopwatch_wait_until_expired(&sw);
printk(BIOS_NOTICE, "done!\n");
}