public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: socfpga: Assure correct ACTLR configuration
@ 2018-05-29 16:39 Marek Vasut
  2018-05-31  9:52 ` See, Chin Liang
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2018-05-29 16:39 UTC (permalink / raw)
  To: u-boot

Make sure the ARM ACTLR register has correct configuration, otherwise
the Linux kernel refuses to boot. In particular, the "Write Full Line
of Zeroes" bit must be cleared.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
---
NOTE: This gem was well hidden in the Altera U-Boot fork and is really needed.
      What is not entirely clear to me is WHY ? So why is this needed ?

 arch/arm/mach-socfpga/board.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 189e12a668..ffdabc04fc 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -18,7 +18,18 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-void s_init(void) {}
+void s_init(void) {
+	/*
+	 * Preconfigure ACTLR, make sure Write Full Line of Zeroes is disabled.
+	 * This is optional on CycloneV / ArriaV.
+	 * This is mandatory on Arria10, otherwise Linux refuses to boot.
+	 */
+	asm volatile(
+		"mcr p15, 0, %0, c1, c0, 1\n"
+		"isb\n"
+		"dsb\n"
+	::"r"(0x44));
+}
 
 /*
  * Miscellaneous platform dependent initialisations
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-03 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-29 16:39 [U-Boot] [PATCH] ARM: socfpga: Assure correct ACTLR configuration Marek Vasut
2018-05-31  9:52 ` See, Chin Liang
2018-05-31 10:00   ` Marek Vasut
2018-06-06 18:47     ` Marek Vasut
2018-06-23  3:55       ` Marek Vasut
2018-06-23  4:23         ` Marek Vasut
2018-07-03 15:10           ` See, Chin Liang
2018-07-03 16:52             ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox