]> git.sur5r.net Git - u-boot/commitdiff
keystone2: add wfi in to the core_spin loop
authorVitaly Andrianov <vitalya@ti.com>
Wed, 8 Jul 2015 15:40:14 +0000 (11:40 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 27 Jul 2015 19:01:57 +0000 (15:01 -0400)
When core A turning of core B, via tetris DPSC it places the core
B DPSC into transitional state. The core B has to execute wfi instruction
to move its DPSC to the OFF state. This patch add such instruction.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-keystone/cmd_mon.c

index f9f58a37dfcd054a124c88dda265530e2ecf46c8..73ceb8307225e03ccd44222950dd46c252718796 100644 (file)
@@ -55,8 +55,13 @@ U_BOOT_CMD(mon_install, 2, 0, do_mon_install,
 
 static void core_spin(void)
 {
-       while (1)
-               ; /* forever */;
+       while (1) {
+               asm volatile (
+                       "dsb\n"
+                       "isb\n"
+                       "wfi\n"
+               );
+       }
 }
 
 int mon_power_on(int core_id, void *ep)