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>
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;