Merge tag 'renesas-dt-timers-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / arch / arm / mach-shmobile / setup-r8a7740.c
index 35dec23..8fe270d 100644 (file)
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
 #include <linux/platform_data/sh_ipmmu.h>
-#include <mach/dma-register.h>
-#include <mach/r8a7740.h>
-#include <mach/pm-rmobile.h>
-#include <mach/common.h>
-#include <mach/irqs.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
 
+#include "common.h"
+#include "dma-register.h"
+#include "irqs.h"
+#include "pm-rmobile.h"
+#include "r8a7740.h"
+
 static struct map_desc r8a7740_io_desc[] __initdata = {
         /*
          * for CPGA/INTC/PFC
@@ -309,7 +311,7 @@ static struct platform_device ipmmu_device = {
        .num_resources  = ARRAY_SIZE(ipmmu_resources),
 };
 
-static struct platform_device *r8a7740_devices_dt[] __initdata = {
+static struct platform_device *r8a7740_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
        &scif2_device,
@@ -319,16 +321,13 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
        &scif6_device,
        &scif7_device,
        &scif8_device,
-       &cmt1_device,
-};
-
-static struct platform_device *r8a7740_early_devices[] __initdata = {
        &irqpin0_device,
        &irqpin1_device,
        &irqpin2_device,
        &irqpin3_device,
        &tmu0_device,
        &ipmmu_device,
+       &cmt1_device,
 };
 
 /* DMA */
@@ -754,8 +753,6 @@ void __init r8a7740_add_standard_devices(void)
        /* add devices */
        platform_add_devices(r8a7740_early_devices,
                            ARRAY_SIZE(r8a7740_early_devices));
-       platform_add_devices(r8a7740_devices_dt,
-                           ARRAY_SIZE(r8a7740_devices_dt));
        platform_add_devices(r8a7740_late_devices,
                             ARRAY_SIZE(r8a7740_late_devices));
 
@@ -777,8 +774,6 @@ void __init r8a7740_add_early_devices(void)
 {
        early_platform_add_devices(r8a7740_early_devices,
                                   ARRAY_SIZE(r8a7740_early_devices));
-       early_platform_add_devices(r8a7740_devices_dt,
-                                  ARRAY_SIZE(r8a7740_devices_dt));
 
        /* setup early console here as well */
        shmobile_setup_console();
@@ -786,13 +781,6 @@ void __init r8a7740_add_early_devices(void)
 
 #ifdef CONFIG_USE_OF
 
-void __init r8a7740_add_standard_devices_dt(void)
-{
-       platform_add_devices(r8a7740_devices_dt,
-                           ARRAY_SIZE(r8a7740_devices_dt));
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-}
-
 void __init r8a7740_init_irq_of(void)
 {
        void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
@@ -826,7 +814,7 @@ void __init r8a7740_init_irq_of(void)
 static void __init r8a7740_generic_init(void)
 {
        r8a7740_clock_init(0);
-       r8a7740_add_standard_devices_dt();
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
 static const char *r8a7740_boards_compat_dt[] __initdata = {