ARM: EXYNOS: Add secure firmware support to l2x0 initialization
authorTomasz Figa <t.figa@samsung.com>
Wed, 12 Sep 2012 13:35:58 +0000 (15:35 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:42:19 +0000 (11:42 +0900)
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
arch/arm/mach-exynos/common.c
arch/arm/mach-exynos/firmware.c

index 5bb6b26..02fb4a1 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <asm/proc-fns.h>
 #include <asm/exception.h>
+#include <asm/firmware.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
@@ -560,6 +561,8 @@ static int __init exynos4_l2x0_cache_init(void)
        if (soc_is_exynos5250() || soc_is_exynos5440())
                return 0;
 
+       call_firmware_op(l2x0_init);
+
        if (of_have_populated_dt()) {
                ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
                if (ret)
index ed11f10..da5fb26 100644 (file)
@@ -40,10 +40,18 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
        return 0;
 }
 
+static int exynos_l2x0_init(void)
+{
+       exynos_smc(SMC_CMD_L2X0INVALL, 0, 0, 0);
+       exynos_smc(SMC_CMD_L2X0CTRL, 1, 0, 0);
+       return 0;
+}
+
 static const struct firmware_ops exynos_firmware_ops = {
        .do_idle                = exynos_do_idle,
        .set_cpu_boot_addr      = exynos_set_cpu_boot_addr,
        .cpu_boot               = exynos_cpu_boot,
+       .l2x0_init      = exynos_l2x0_init,
 };
 
 void __init exynos_firmware_init(void)