iommu/arm-smmu: Clear cache lock bit of ACR
authorPeng Fan <van.freenix@gmail.com>
Tue, 3 May 2016 13:50:30 +0000 (21:50 +0800)
committerWill Deacon <will.deacon@arm.com>
Tue, 3 May 2016 17:23:04 +0000 (18:23 +0100)
commit3ca3712a42f9e632eb41da94ca4eab4f1fb06fcb
tree091456c97c6d9c926df6bf5bf6800a59533f9c35
parentb7862e3559f9ab4aaa258dcb846986601a7ca0b8
iommu/arm-smmu: Clear cache lock bit of ACR

According MMU-500r2 TRM, section 3.7.1 Auxiliary Control registers,
You can modify ACTLR only when the ACR.CACHE_LOCK bit is 0.

So before clearing ARM_MMU500_ACTLR_CPRE of each context bank,
need clear CACHE_LOCK bit of ACR register first.

Since CACHE_LOCK bit is only present in MMU-500r2 onwards,
need to check the major number of IDR7.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Peng Fan <van.freenix@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c