[U-Boot] [PATCH v2 2/2] efi_loader: check timer events in Stall()
Heinrich Schuchardt
xypron.glpk at gmx.de
Tue Jun 4 19:33:14 UTC 2019
During a call to Stall() we should periodically check for timer events.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
Remove redundant implementation of usec_to_tick() in
arch/arm/mach-rockchip/rk_timer.c
---
lib/efi_loader/efi_boottime.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 5714deca70..b64ca54dbc 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1990,8 +1990,14 @@ out:
*/
static efi_status_t EFIAPI efi_stall(unsigned long microseconds)
{
+ u64 end_tick;
+
EFI_ENTRY("%ld", microseconds);
- udelay(microseconds);
+
+ end_tick = get_ticks() + usec_to_tick(microseconds);
+ while (get_ticks() < end_tick)
+ efi_timer_check();
+
return EFI_EXIT(EFI_SUCCESS);
}
--
2.20.1
More information about the U-Boot
mailing list