Merge tag 'ep93xx-fixes-for-3.12' of git://github.com/RyanMallon/linux-ep93xx into...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-highbank / highbank.c
index 88815795fe2678f7c41e54fd296397ace8de9a62..8e63ccdb0de3c9c80923e46eadec91e6e9e1689e 100644 (file)
 #include <linux/clocksource.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
-#include <linux/irq.h>
 #include <linux/irqchip.h>
-#include <linux/irqdomain.h>
 #include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
-#include <linux/smp.h>
 #include <linux/amba/bus.h>
 #include <linux/clk-provider.h>
 
@@ -35,7 +32,6 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
-#include <asm/mach/time.h>
 
 #include "core.h"
 #include "sysregs.h"
@@ -65,13 +61,11 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
                          HB_JUMP_TABLE_PHYS(cpu) + 15);
 }
 
-#ifdef CONFIG_CACHE_L2X0
 static void highbank_l2x0_disable(void)
 {
        /* Disable PL310 L2 Cache controller */
        highbank_smc1(0x102, 0x0);
 }
-#endif
 
 static void __init highbank_init_irq(void)
 {
@@ -80,12 +74,13 @@ static void __init highbank_init_irq(void)
        if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
                highbank_scu_map_io();
 
-#ifdef CONFIG_CACHE_L2X0
        /* Enable PL310 L2 Cache controller */
-       highbank_smc1(0x102, 0x1);
-       l2x0_of_init(0, ~0UL);
-       outer_cache.disable = highbank_l2x0_disable;
-#endif
+       if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
+           of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
+               highbank_smc1(0x102, 0x1);
+               l2x0_of_init(0, ~0UL);
+               outer_cache.disable = highbank_l2x0_disable;
+       }
 }
 
 static void __init highbank_timer_init(void)
@@ -176,6 +171,9 @@ static const char *highbank_match[] __initconst = {
 };
 
 DT_MACHINE_START(HIGHBANK, "Highbank")
+#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
+       .dma_zone_size  = (4ULL * SZ_1G),
+#endif
        .smp            = smp_ops(highbank_smp_ops),
        .init_irq       = highbank_init_irq,
        .init_time      = highbank_timer_init,