From 12e55ba8a68e5d40e08ad169848bdf274887ce0b Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Sun, 18 Aug 2013 20:01:07 -0700 Subject: [PATCH] Exynos5420: invoke the cooperative threading in udelay Call thread_yield_microseconds in udelay. This works with and without COOP_MULTITASKING enabled. BUG=None TEST=Build and boot with multitasking on and off, it works. BRANCH=None 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 --- src/cpu/samsung/exynos5420/timer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpu/samsung/exynos5420/timer.c b/src/cpu/samsung/exynos5420/timer.c index 0c2e64143c..724f43a3fd 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);