public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: at91: sama5d4: Properly configure L2CC
@ 2015-03-04 11:29 Alexandre Belloni
  2015-03-09 17:23 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2015-03-04 11:29 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Jean-Christophe Plagniol-Villard, Wenyou Yang, linux-arm-kernel,
	linux-kernel, Boris Brezillon, Alexandre Belloni

As the bootloader may not properly configure the L2CC, enforce its configuration
in the kernel.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/boot/dts/sama5d4.dtsi | 4 ++++
 arch/arm/mach-at91/sama5.c     | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 07953f279a56..8998f14dda04 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -270,6 +270,10 @@
 			interrupts = <67 IRQ_TYPE_LEVEL_HIGH 4>;
 			cache-unified;
 			cache-level = <2>;
+			arm,double-linefill = <1>;
+			arm,double-linefill-incr = <1>;
+			arm,prefetch-drop = <1>;
+			arm,prefetch-offset = <1>;
 		};
 
 		nand0: nand@80000000 {
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index 03dcb441f3d2..a3df9328daa9 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -22,6 +22,7 @@
 #include <mach/hardware.h>
 
 #include <asm/setup.h>
+#include <asm/hardware/cache-l2x0.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -107,5 +108,7 @@ DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
 	.map_io		= sama5_alt_map_io,
 	.init_machine	= sama5_dt_device_init,
 	.dt_compat	= sama5_alt_dt_board_compat,
+	.l2c_aux_val	= L310_AUX_CTRL_DATA_PREFETCH |
+		L310_AUX_CTRL_INSTR_PREFETCH,
 	.l2c_aux_mask	= ~0UL,
 MACHINE_END
-- 
2.1.0


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

end of thread, other threads:[~2015-03-09 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 11:29 [PATCH] ARM: at91: sama5d4: Properly configure L2CC Alexandre Belloni
2015-03-09 17:23 ` Russell King - ARM Linux
2015-03-09 18:33   ` Alexandre Belloni

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