Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / mach-mvebu / armada-370-xp.c
index 433e8c5..42a4cb3 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/time-armada-370-xp.h>
 #include <linux/clk/mvebu.h>
 #include <linux/dma-mapping.h>
+#include <linux/mbus.h>
 #include <linux/irqchip.h>
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
@@ -50,6 +51,8 @@ void __init armada_370_xp_timer_and_clk_init(void)
 
 void __init armada_370_xp_init_early(void)
 {
+       char *mbus_soc_name;
+
        /*
         * Some Armada 370/XP devices allocate their coherent buffers
         * from atomic context. Increase size of atomic coherent pool
@@ -57,6 +60,21 @@ void __init armada_370_xp_init_early(void)
         */
        init_dma_coherent_pool_size(SZ_1M);
 
+       /*
+        * This initialization will be replaced by a DT-based
+        * initialization once the mvebu-mbus driver gains DT support.
+        */
+       if (of_machine_is_compatible("marvell,armada370"))
+               mbus_soc_name = "marvell,armada370-mbus";
+       else
+               mbus_soc_name = "marvell,armadaxp-mbus";
+
+       mvebu_mbus_init(mbus_soc_name,
+                       ARMADA_370_XP_MBUS_WINS_BASE,
+                       ARMADA_370_XP_MBUS_WINS_SIZE,
+                       ARMADA_370_XP_SDRAM_WINS_BASE,
+                       ARMADA_370_XP_SDRAM_WINS_SIZE);
+
 #ifdef CONFIG_CACHE_L2X0
        l2x0_of_init(0, ~0UL);
 #endif