ARM: 8886/1: l2x0: support parity-enable/disable on aurora
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Fri, 12 Jul 2019 04:46:53 +0000 (05:46 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 29 Aug 2019 06:58:01 +0000 (07:58 +0100)
The aurora cache on the Marvell Armada-XP SoC supports the same tag
parity features as the other l2x0 cache implementations.

[jlu@pengutronix.de: use aurora specific define AURORA_ACR_PARITY_EN]

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/cache-l2x0.c

index 83b733a..46a616e 100644 (file)
@@ -1493,6 +1493,13 @@ static void __init aurora_of_parse(const struct device_node *np,
                mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK;
        }
 
+       if (of_property_read_bool(np, "arm,parity-enable")) {
+               mask |= AURORA_ACR_PARITY_EN;
+               val |= AURORA_ACR_PARITY_EN;
+       } else if (of_property_read_bool(np, "arm,parity-disable")) {
+               mask |= AURORA_ACR_PARITY_EN;
+       }
+
        *aux_val &= ~mask;
        *aux_val |= val;
        *aux_mask &= ~mask;