From e33369cbf346a41daab7d2eaf23c7e5bb76ef67c Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 9 Apr 2013 23:26:14 +0200 Subject: [PATCH] ARM: mvebu: move L2 cache initialization in init_early() In preparation for moving the IRQ controller driver to drivers/irqchip/, we don't want the IRQ controller driver to be responsible for initializing the L2 cache. Instead, let's initialize the L2 cache at the init_early() level, like mach-exynos/common.c is doing. Signed-off-by: Thomas Petazzoni Tested-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- arch/arm/mach-mvebu/armada-370-xp.c | 5 +++++ arch/arm/mach-mvebu/irq-armada-370-xp.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index a5ea616d6d12..c1bbfa74e646 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +55,10 @@ void __init armada_370_xp_init_early(void) * to make sure such the allocations won't fail. */ init_dma_coherent_pool_size(SZ_1M); + +#ifdef CONFIG_CACHE_L2X0 + l2x0_of_init(0, ~0UL); +#endif } static void __init armada_370_xp_dt_init(void) diff --git a/arch/arm/mach-mvebu/irq-armada-370-xp.c b/arch/arm/mach-mvebu/irq-armada-370-xp.c index 6a9195e10579..f6699f303e6d 100644 --- a/arch/arm/mach-mvebu/irq-armada-370-xp.c +++ b/arch/arm/mach-mvebu/irq-armada-370-xp.c @@ -25,7 +25,6 @@ #include #include #include -#include /* Interrupt Controller Registers Map */ #define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48) @@ -292,7 +291,4 @@ static const struct of_device_id mpic_of_match[] __initconst = { void __init armada_370_xp_init_irq(void) { of_irq_init(mpic_of_match); -#ifdef CONFIG_CACHE_L2X0 - l2x0_of_init(0, ~0UL); -#endif } -- 2.34.1