The code runs in EL3, use EL3 accessors to manipulate the cache bits.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
}
#if RCAR_BL2_DCACHE == 1
/* clean and disable */
- write_sctlr_el1(read_sctlr_el1() & ~SCTLR_C_BIT);
+ write_sctlr_el3(read_sctlr_el3() & ~SCTLR_C_BIT);
dcsw_op_all(DCCISW);
#endif
ret = (mmio_read_32(RCAR_BOOT_KEY_CERT_NEW) == RCAR_CERT_MAGIC_NUM) ?
#if RCAR_BL2_DCACHE == 1
/* enable */
- write_sctlr_el1(read_sctlr_el1() | SCTLR_C_BIT);
+ write_sctlr_el3(read_sctlr_el3() | SCTLR_C_BIT);
#endif
#endif