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)
This commit is contained in:
Ronald G. Minnich 2013-08-18 20:01:07 -07:00 committed by Isaac Christensen
parent ca63027ef7
commit e10ef42a55
1 changed files with 4 additions and 1 deletions

View File

@ -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);