From e10ef42a55705530f54e1f04bc25b21aeda5693a Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Sun, 18 Aug 2013 20:01:07 -0700 Subject: Exynos5420: invoke the cooperative threading in udelay Call thread_yield_microseconds in udelay. This works with and without COOP_MULTITASKING enabled. Change-Id: Ib3eab00d1630dc4daada850e7458ab89702d1864 Signed-off-by: Ronald G. Minnich Reviewed-on: https://gerrit.chromium.org/gerrit/66327 Reviewed-by: Aaron Durbin Reviewed-by: Vincent Palatin Commit-Queue: Ronald G. Minnich Tested-by: Ronald G. Minnich (cherry picked from commit 12e55ba8a68e5d40e08ad169848bdf274887ce0b) Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/6510 Tested-by: build bot (Jenkins) --- src/cpu/samsung/exynos5420/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cpu/samsung/exynos5420/timer.c b/src/cpu/samsung/exynos5420/timer.c index 88e1f3e489..f8d3110000 100644 --- a/src/cpu/samsung/exynos5420/timer.c +++ b/src/cpu/samsung/exynos5420/timer.c @@ -20,7 +20,7 @@ #include #include #include - +#include #include "clk.h" void init_timer(void) @@ -33,6 +33,9 @@ void udelay(unsigned usec) { struct mono_time current, end; + if (!thread_yield_microseconds(usec)) + return; + timer_monotonic_get(¤t); end = current; mono_time_add_usecs(&end, usec); -- cgit v1.2.3