public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/3] mach-imx: bootaux: add dcache flushing before enabling M4
Date: Thu, 28 Nov 2019 15:56:20 +0200	[thread overview]
Message-ID: <20191128135621.12719-2-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <20191128135621.12719-1-igor.opaniuk@gmail.com>

From: Igor Opaniuk <igor.opaniuk@toradex.com>

This patch fixes the issue with broken bootaux command,
when M4 binary is loaded and data cache isn't flushed
before M4 core is enabled.

Reproducing:
> tftpboot ${loadaddr} ${board_name}/hello_world.bin
> cp.b ${loadaddr} 0x7F8000 $filesize
> bootaux 0x7F8000

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 arch/arm/mach-imx/imx_bootaux.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index ee786f7d06..c750cee60c 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -27,6 +27,8 @@ int arch_auxiliary_core_up(u32 core_id, ulong boot_private_data)
 	writel(stack, M4_BOOTROM_BASE_ADDR);
 	writel(pc, M4_BOOTROM_BASE_ADDR + 4);
 
+	flush_dcache_all();
+
 	/* Enable M4 */
 #ifdef CONFIG_IMX8M
 	call_imx_sip(IMX_SIP_SRC, IMX_SIP_SRC_M4_START, 0, 0, 0);
-- 
2.17.1

  reply	other threads:[~2019-11-28 13:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 13:56 [U-Boot] [PATCH v2 1/3] mach-imx: bootaux: print stack pointer and reset vector Igor Opaniuk
2019-11-28 13:56 ` Igor Opaniuk [this message]
2019-12-03 14:32   ` [U-Boot] [PATCH v2 2/3] mach-imx: bootaux: add dcache flushing before enabling M4 Oleksandr Suvorov
2019-12-29 10:25   ` sbabic at denx.de
2019-11-28 13:56 ` [U-Boot] [PATCH v2 3/3] mach-imx: bootaux: elf firmware support Igor Opaniuk
2019-12-03 14:37   ` Oleksandr Suvorov
2019-12-27 15:45   ` Stefano Babic
2019-12-28 12:33   ` Stefano Babic
2019-12-30 12:04     ` Igor Opaniuk
2019-12-30 12:23       ` Stefano Babic
2019-12-03 14:33 ` [U-Boot] [PATCH v2 1/3] mach-imx: bootaux: print stack pointer and reset vector Oleksandr Suvorov
2019-12-29 10:25 ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191128135621.12719-2-igor.opaniuk@gmail.com \
    --to=igor.opaniuk@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox