aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-04-09 17:26:14 -0400
committerJason Cooper <jason@lakedaemon.net>2013-04-15 15:34:16 -0400
commite33369cbf346a41daab7d2eaf23c7e5bb76ef67c (patch)
tree062671b6874e09b028079d8f8aca3763d555403a
parent31880c37c11e28cb81c70757e38392b42e695dc6 (diff)
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 <thomas.petazzoni@free-electrons.com> Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c5
-rw-r--r--arch/arm/mach-mvebu/irq-armada-370-xp.c4
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 @@
19#include <linux/time-armada-370-xp.h> 19#include <linux/time-armada-370-xp.h>
20#include <linux/clk/mvebu.h> 20#include <linux/clk/mvebu.h>
21#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
22#include <asm/hardware/cache-l2x0.h>
22#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 24#include <asm/mach/map.h>
24#include <asm/mach/time.h> 25#include <asm/mach/time.h>
@@ -54,6 +55,10 @@ void __init armada_370_xp_init_early(void)
54 * to make sure such the allocations won't fail. 55 * to make sure such the allocations won't fail.
55 */ 56 */
56 init_dma_coherent_pool_size(SZ_1M); 57 init_dma_coherent_pool_size(SZ_1M);
58
59#ifdef CONFIG_CACHE_L2X0
60 l2x0_of_init(0, ~0UL);
61#endif
57} 62}
58 63
59static void __init armada_370_xp_dt_init(void) 64static 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 @@
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/exception.h> 26#include <asm/exception.h>
27#include <asm/smp_plat.h> 27#include <asm/smp_plat.h>
28#include <asm/hardware/cache-l2x0.h>
29 28
30/* Interrupt Controller Registers Map */ 29/* Interrupt Controller Registers Map */
31#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48) 30#define ARMADA_370_XP_INT_SET_MASK_OFFS (0x48)
@@ -292,7 +291,4 @@ static const struct of_device_id mpic_of_match[] __initconst = {
292void __init armada_370_xp_init_irq(void) 291void __init armada_370_xp_init_irq(void)
293{ 292{
294 of_irq_init(mpic_of_match); 293 of_irq_init(mpic_of_match);
295#ifdef CONFIG_CACHE_L2X0
296 l2x0_of_init(0, ~0UL);
297#endif
298} 294}