Use stopwatch_wait_until_expired where applicable
Change-Id: I4d6c6810b91294a7e401a4a1a446218c04c98e55 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/21590 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
This commit is contained in:
parent
109ba284a1
commit
c966075f46
|
@ -149,8 +149,7 @@ static void rx6110sa_init(struct device *dev)
|
||||||
* Take the needed delay after a reset sequence into account before the
|
* Take the needed delay after a reset sequence into account before the
|
||||||
* VLF-bit can be cleared.
|
* VLF-bit can be cleared.
|
||||||
*/
|
*/
|
||||||
while (!stopwatch_expired(&sw))
|
stopwatch_wait_until_expired(&sw);
|
||||||
;
|
|
||||||
flags &= ~VLF_BIT;
|
flags &= ~VLF_BIT;
|
||||||
rx6110sa_write(dev, FLAG_REGISTER, flags);
|
rx6110sa_write(dev, FLAG_REGISTER, flags);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
struct spi_slave *slave = (struct spi_slave *)context;
|
||||||
int ret = 0;
|
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);
|
spi_claim_bus(slave);
|
||||||
|
|
||||||
/* Allow EC to ramp up clock after being awaken.
|
/* Allow EC to ramp up clock after being awaken.
|
||||||
|
|
|
@ -34,7 +34,5 @@ void udelay(unsigned int usec)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
stopwatch_init_usecs_expire(&sw, usec);
|
stopwatch_init_usecs_expire(&sw, usec);
|
||||||
|
stopwatch_wait_until_expired(&sw);
|
||||||
while (!stopwatch_expired(&sw))
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,7 @@ void main(void)
|
||||||
/* init memory */
|
/* init memory */
|
||||||
mt_mem_init(get_sdram_config());
|
mt_mem_init(get_sdram_config());
|
||||||
|
|
||||||
while (!stopwatch_expired(&sw))
|
stopwatch_wait_until_expired(&sw);
|
||||||
;
|
|
||||||
|
|
||||||
/* Set to maximum frequency */
|
/* Set to maximum frequency */
|
||||||
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
|
if (board_id() + CONFIG_BOARD_ID_ADJUSTMENT < 5)
|
||||||
|
|
|
@ -165,8 +165,7 @@ static void wait_for_legacy_dev(void *unused)
|
||||||
stopwatch_init_msecs_expire(&sw, (legacy_delay - us_since_boot) / 1000);
|
stopwatch_init_msecs_expire(&sw, (legacy_delay - us_since_boot) / 1000);
|
||||||
printk(BIOS_NOTICE, "Wait remaining %d of %d us for legacy devices...",
|
printk(BIOS_NOTICE, "Wait remaining %d of %d us for legacy devices...",
|
||||||
legacy_delay - us_since_boot, legacy_delay);
|
legacy_delay - us_since_boot, legacy_delay);
|
||||||
while (!stopwatch_expired(&sw))
|
stopwatch_wait_until_expired(&sw);
|
||||||
;
|
|
||||||
printk(BIOS_NOTICE, "done!\n");
|
printk(BIOS_NOTICE, "done!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue