From: Varun Sethi <varun.se...@freescale.com>

Enable OMT cache, before invalidating PAACT and SPAACT cache. This
is a PAMU hardware errata work around.

Signed-off-by: Varun Sethi <varun.se...@freescale.com>
Signed-off-by: Codrin Ciubotariu <codrin.ciubota...@nxp.com>
---
 drivers/iommu/fsl_pamu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index a00c473..ce25084 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -731,6 +731,16 @@ static int setup_one_pamu(unsigned long pamu_reg_base,
        pamu_regs = (struct pamu_mmap_regs *)
                (pamu_reg_base + PAMU_MMAP_REGS_BASE);
 
+       /*
+        * As per PAMU errata A-005982, writing the PAACT and SPAACT
+        * base address registers wouldn't invalidate the corresponding
+        * caches if the OMT cache is disabled. The workaround is to
+        * enable the OMT cache before setting the base registers.
+        * This can be done without actually enabling PAMU.
+        */
+
+       out_be32(pc, PAMU_PC_OCE);
+
        /* set up pointers to corenet control blocks */
 
        out_be32(&pamu_regs->ppbah, upper_32_bits(ppaact_phys));
-- 
1.9.3

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to