summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-08-18 20:01:07 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-07 23:04:28 +0200
commite10ef42a55705530f54e1f04bc25b21aeda5693a (patch)
tree96712d32115a8dc34e99adc8302173b657edb63a /src/cpu
parentca63027ef7627ba60f6776f2c9bd373cdb2afbb0 (diff)
downloadcoreboot-e10ef42a55705530f54e1f04bc25b21aeda5693a.tar.xz
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 <rminnich@gmail.com> Reviewed-on: https://gerrit.chromium.org/gerrit/66327 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Ronald G. Minnich <rminnich@chromium.org> Tested-by: Ronald G. Minnich <rminnich@chromium.org> (cherry picked from commit 12e55ba8a68e5d40e08ad169848bdf274887ce0b) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6510 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/samsung/exynos5420/timer.c5
1 files changed, 4 insertions, 1 deletions
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 <console/console.h>
#include <timer.h>
#include <delay.h>
-
+#include <thread.h>
#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(&current);
end = current;
mono_time_add_usecs(&end, usec);