ARM: EXYNOS: Fail l2x0 cache initialization if DT-based init fails
authorTomasz Figa <t.figa@samsung.com>
Wed, 12 Sep 2012 13:30:32 +0000 (15:30 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:42:19 +0000 (11:42 +0900)
On DT-based boards, DT decides whether to enable l2x0 cache controller
or not.

This patch modifies Exynos l2x0 cache initialization code to fail if
l2x0_of_init fails.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
arch/arm/mach-exynos/common.c

index f7e504b..5bb6b26 100644 (file)
@@ -560,8 +560,10 @@ static int __init exynos4_l2x0_cache_init(void)
        if (soc_is_exynos5250() || soc_is_exynos5440())
                return 0;
 
-       ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
-       if (!ret) {
+       if (of_have_populated_dt()) {
+               ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK);
+               if (ret)
+                       return ret;
                l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
                clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
                return 0;