diff mbox

[U-Boot] keystone2: add wfi in to the core_spin loop

Message ID 1436370014-3725-1-git-send-email-vitalya@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Vitaly Andrianov July 8, 2015, 3:40 p.m. UTC
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>
---
 arch/arm/mach-keystone/cmd_mon.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Tom Rini July 14, 2015, 10:11 p.m. UTC | #1
On Wed, Jul 08, 2015 at 11:40:14AM -0400, Vitaly Andrianov wrote:

> 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>
Tom Rini July 28, 2015, 2:58 p.m. UTC | #2
On Wed, Jul 08, 2015 at 11:40:14AM -0400, Vitaly Andrianov wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index f9f58a3..73ceb83 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -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)