From: Marek Vasut Date: Tue, 29 May 2018 18:39:33 +0200 Subject: [U-Boot] [PATCH] ARM: socfpga: Assure correct ACTLR configuration Message-ID: <20180529163933.29665-1-marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Chin Liang See Cc: Dinh Nguyen --- 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