rcar_gen3: drivers: auth-mod: Access SCTLR in EL3
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 27 Dec 2018 19:26:01 +0000 (20:26 +0100)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Tue, 8 Jan 2019 13:08:44 +0000 (14:08 +0100)
The code runs in EL3, use EL3 accessors to manipulate the cache bits.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
drivers/renesas/rcar/auth/auth_mod.c

index d9446d95e0a309792c797464f39eca858dad6fd7..f7d8ec08a0c559f72e1ccd4e8d3864c0a9aa2a75 100644 (file)
@@ -113,7 +113,7 @@ verify_image:
        }
 #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) ?
@@ -124,7 +124,7 @@ verify_image:
 
 #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