From: Lucas Stach <dev@lynxeye.de>
To: barebox@lists.infradead.org
Subject: [PATCH] ARM: zynq: zed: partially revert zynq_cpu_lowlevel_init() chnages
Date: Mon, 13 Jan 2020 20:36:37 +0100 [thread overview]
Message-ID: <20200113193637.133182-1-dev@lynxeye.de> (raw)
Calling arm_cpu_lowlevel_init() from zynq_cpu_lowlevel_init() adds a stack
push/pop to the latter function which doesn't work this early in the boot.
As the BootROM apparently hands proccessor control to us in abort(!?!)
mode, setting up a stack requires duplicating most of arm_cpu_lowlevel_init().
To get around this catch-22 move the call to arm_cpu_lowlevel_init back into
the board lowlevel start function, so we don't need a stack at all.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
arch/arm/boards/avnet-zedboard/lowlevel.c | 1 +
arch/arm/mach-zynq/cpu_init.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index c987db75b068..8edc6293f210 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -284,6 +284,7 @@ ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
void *fdt = __dtb_zynq_zed_start + get_runtime_offset();
+ arm_cpu_lowlevel_init();
zynq_cpu_lowlevel_init();
avnet_zedboard_ps7_init();
diff --git a/arch/arm/mach-zynq/cpu_init.c b/arch/arm/mach-zynq/cpu_init.c
index ec5ee59e169d..ca7c4b297988 100644
--- a/arch/arm/mach-zynq/cpu_init.c
+++ b/arch/arm/mach-zynq/cpu_init.c
@@ -7,8 +7,6 @@
void zynq_cpu_lowlevel_init(void)
{
- arm_cpu_lowlevel_init();
-
enable_arm_errata_761320_war();
enable_arm_errata_794072_war();
enable_arm_errata_845369_war();
--
2.24.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2020-01-13 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 19:36 Lucas Stach [this message]
2020-01-14 11:07 ` Sascha Hauer
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=20200113193637.133182-1-dev@lynxeye.de \
--to=dev@lynxeye.de \
--cc=barebox@lists.infradead.org \
/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