From 75b2aa51b4c885ea9171f68b2da8b361ee7c7004 Mon Sep 17 00:00:00 2001 From: Marcin Wojtas Date: Wed, 9 Aug 2017 01:25:47 +0000 Subject: [PATCH] Enable pl310 coherent operation in platform init for Armada 38x Updating PL310 sotfware context sc_io_coherent field in platform_pl310_init() routine for Armada 38x helps to avoid using 'arm,io-coherent' property, which is by default not present in the device tree node in Linux. This way another step for DT unification between two operating systems is done. The improvemnt will also work after enabling PLATFORM for Marvell ARMv7 SoCs. Reviewed by: andrew, cognet (mentor) Approved by: cognet (mentor) Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D11883 --- sys/arm/mv/armada38x/armada38x_pl310.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm/mv/armada38x/armada38x_pl310.c b/sys/arm/mv/armada38x/armada38x_pl310.c index 892cde12625..52e818d1210 100644 --- a/sys/arm/mv/armada38x/armada38x_pl310.c +++ b/sys/arm/mv/armada38x/armada38x_pl310.c @@ -57,6 +57,9 @@ platform_pl310_init(struct pl310_softc *sc) pl310_write4(sc, PL310_PREFETCH_CTRL, PREFETCH_CTRL_DL | PREFETCH_CTRL_DATA_PREFETCH | PREFETCH_CTRL_INCR_DL | PREFETCH_CTRL_DL_ON_WRAP); + + /* Disable L2 cache sync for IO coherent operation */ + sc->sc_io_coherent = true; } void