From: Chris Packham Date: Fri, 12 Jul 2019 04:46:55 +0000 (+0100) Subject: ARM: 8890/1: l2x0: add marvell,ecc-enable property for aurora X-Git-Tag: Ubuntu-5.10.0-12.13~4465^2~7 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c8abbd6f9dc47dffaea5adc7172ffa59a16401e3;p=mirror_ubuntu-hirsute-kernel.git ARM: 8890/1: l2x0: add marvell,ecc-enable property for aurora The aurora cache on the Marvell Armada-XP SoC supports ECC protection for the L2 data arrays. Add a "marvell,ecc-enable" device tree property which can be used to enable this. [jlu@pengutronix.de: use aurora specific define AURORA_ACR_ECC_EN] Signed-off-by: Chris Packham Signed-off-by: Jan Luebbe Signed-off-by: Russell King --- diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 46a616ec6b0c..12c26eb88afb 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -1493,6 +1493,11 @@ static void __init aurora_of_parse(const struct device_node *np, mask |= AURORA_ACR_FORCE_WRITE_POLICY_MASK; } + if (of_property_read_bool(np, "marvell,ecc-enable")) { + mask |= AURORA_ACR_ECC_EN; + val |= AURORA_ACR_ECC_EN; + } + if (of_property_read_bool(np, "arm,parity-enable")) { mask |= AURORA_ACR_PARITY_EN; val |= AURORA_ACR_PARITY_EN;