From 887a8b6ec287c20f802d5007081e7f5d615c51db Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 29 May 2018 16:16:46 +0200 Subject: ARM: socfpga: Assure correct ACTLR configuration 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 --- arch/arm/mach-socfpga/board.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-socfpga/board.c') diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 189e12a668..cb6530f7e8 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"(0x0)); +} /* * Miscellaneous platform dependent initialisations -- cgit v1.2.3 From 8c9f247a1a2031b200c04f297d5b9ae1353d9d90 Mon Sep 17 00:00:00 2001 From: Ley Foon Tan Date: Thu, 12 Jul 2018 19:13:34 +0800 Subject: arm: socfpga: Fix: Compile MCR instruction on ARM 32-bit only MCR instruction only available in ARM 32-bit. So, compile MCR instruction when ARM 32-bit is enabled. Signed-off-by: Ley Foon Tan --- arch/arm/mach-socfpga/board.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-socfpga/board.c') diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index cb6530f7e8..26d84be6e9 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -19,6 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; void s_init(void) { +#ifndef CONFIG_ARM64 /* * Preconfigure ACTLR, make sure Write Full Line of Zeroes is disabled. * This is optional on CycloneV / ArriaV. @@ -29,6 +30,7 @@ void s_init(void) { "isb\n" "dsb\n" ::"r"(0x0)); +#endif } /* -- cgit v1.2.3