From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Tue, 19 Feb 2013 15:25:28 +0100 Subject: [U-Boot] [PATCH] Fix omap5 hyp mode for second cpu In-Reply-To: <50B4B136.1020402@codethink.co.uk> References: <50B4B136.1020402@codethink.co.uk> Message-ID: <1361283928-12762-1-git-send-email-v-stehle@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Make it work on PandaBoard 5 with 5432 ES2 and Linux. Signed-off-by: Vincent Stehl? --- Hi, Here are some necessary adaptations for OMAP5 ES2, as magic value has changed. In the mean time, we make the secondary cpu routine a bit closer to what romcode does. Best regards, V. arch/arm/lib/bootm.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 02852d6..dd8f42e 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -56,16 +56,21 @@ asm ( "ldr r12, =0x102\n" "mov r0, pc\n" "smc 0x1\n" - "ldr r1, =0x48281804\n" // AUX_CORE_BOOT_1 + "ldr r1, =0x48281800\n" /* AUX_CORE_BOOT_0 */ "mov r2, #0\n" - "str r2, [r1]\n" + "str r2, [r1]\n" /* AUX_CORE_BOOT_0 */ + "str r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */ "isb\n" "dsb\n" + "mov r3, #0xf0\n" "1: wfe\n" - "ldr r2, [r1]\n" - "cmp r2, #0\n" - "movne pc, r2\n" - "b 1b\n" + "ldr r2, [r1]\n" /* AUX_CORE_BOOT_0 */ + "ands r2, r2, r3\n" + "beq 1b\n" + "ldr r2, [r1, #4]\n" /* AUX_CORE_BOOT_1 */ + "cmp r2, #0\n" + "beq 1b\n" + "bx r2\n" ".popsection\n" ); @@ -378,7 +383,7 @@ void hyp_enable(void) { "ldr r1, =0x48281800\n" // AUX_CORE_BOOT_1 "ldr r2, =__hyp_init_sec\n" "str r2, [r1, #4]\n" - "mov r2, #0x200\n" + "mov r2, #0x20\n" "str r2, [r1]\n" // AUX_CORE_BOOT_0 "isb\n" "dmb\n" -- 1.7.9.5