iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743
authorHanna Hawa <hannah@marvell.com>
Wed, 15 Jul 2020 07:06:47 +0000 (09:06 +0200)
committerWill Deacon <will@kernel.org>
Thu, 16 Jul 2020 08:29:22 +0000 (09:29 +0100)
commitf2d9848aeb9fa71523bbfb226203ffb7d50877d2
treea9c17f640facbc94da5bde62f7030be23824d6dc
parent6a79a5a3842b6a9f639fe2874dd6ae0bd4b24d1a
iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743

Due to erratum #582743, the Marvell Armada-AP806 can't access 64bit to
ARM SMMUv2 registers.

Provide implementation relevant hooks:
- split the writeq/readq to two accesses of writel/readl.
- mask the MMU_IDR2.PTFSv8 fields to not use AArch64 format (but
only AARCH32_L) since with AArch64 format 32 bits access is not supported.

Note that most 64-bit registers like TTBRn can be accessed as two 32-bit
halves without issue, and AArch32 format ensures that the register writes
which must be atomic (for TLBI etc.) need only be 32-bit.

Signed-off-by: Hanna Hawa <hannah@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20200715070649.18733-3-tn@semihalf.com
Signed-off-by: Will Deacon <will@kernel.org>
Documentation/arm64/silicon-errata.rst
drivers/iommu/arm-smmu-impl.c