arm: omap: emif-common: Disable interleaving
authorKrunal Bhargav <k-bhargav@ti.com>
Mon, 16 Sep 2019 08:17:17 +0000 (13:47 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2019 17:31:17 +0000 (13:31 -0400)
If ECC is enabled, we need to ensure interleaving is disabled for higher
address space.

Signed-off-by: Krunal Bhargav <k-bhargav@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-omap2/emif-common.c

index 04bbfd84a20b26c8abd1a2f1e00ca0ed1ad0defd..9bdaa388c9fcd8c3e79d768aa922ef4ae29ad54c 100644 (file)
@@ -355,6 +355,9 @@ static void dra7_enable_ecc(u32 base, const struct emif_regs *regs)
                return;
 
        if (regs->emif_ecc_ctrl_reg & EMIF_ECC_CTRL_REG_ECC_EN_MASK) {
+               /* Disable high-order interleaving */
+               clrbits_le32(MA_PRIORITY, MA_HIMEM_INTERLEAVE_UN_MASK);
+
                writel(regs->emif_ecc_address_range_1,
                       &emif->emif_ecc_address_range_1);
                writel(regs->emif_ecc_address_range_2,