[coreboot-gerrit] New patch to review for coreboot: bec2642 Exynos5420: invoke the cooperative threading in udelay

Isaac Christensen (isaac.christensen@se-eng.com) gerrit at coreboot.org
Wed Aug 6 23:06:10 CEST 2014


Isaac Christensen (isaac.christensen at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6510

-gerrit

commit bec264203778168f41b9a178a9fcb61d63bed02d
Author: Ronald G. Minnich <rminnich at gmail.com>
Date:   Sun Aug 18 20:01:07 2013 -0700

    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 at gmail.com>
    Reviewed-on: https://gerrit.chromium.org/gerrit/66327
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Reviewed-by: Vincent Palatin <vpalatin at chromium.org>
    Commit-Queue: Ronald G. Minnich <rminnich at chromium.org>
    Tested-by: Ronald G. Minnich <rminnich at chromium.org>
    (cherry picked from commit 12e55ba8a68e5d40e08ad169848bdf274887ce0b)
    Signed-off-by: Isaac Christensen <isaac.christensen at se-eng.com>
---
 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 88e1f3e..f8d3110 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);



More information about the coreboot-gerrit mailing list