|
@@ -531,11 +531,7 @@ static struct platform_device ipmmu_device = {
|
|
|
.num_resources = ARRAY_SIZE(ipmmu_resources),
|
|
|
};
|
|
|
|
|
|
-static struct platform_device *r8a7740_early_devices[] __initdata = {
|
|
|
- &irqpin0_device,
|
|
|
- &irqpin1_device,
|
|
|
- &irqpin2_device,
|
|
|
- &irqpin3_device,
|
|
|
+static struct platform_device *r8a7740_devices_dt[] __initdata = {
|
|
|
&scif0_device,
|
|
|
&scif1_device,
|
|
|
&scif2_device,
|
|
@@ -546,6 +542,13 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
|
|
|
&scif7_device,
|
|
|
&scifb_device,
|
|
|
&cmt10_device,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *r8a7740_early_devices[] __initdata = {
|
|
|
+ &irqpin0_device,
|
|
|
+ &irqpin1_device,
|
|
|
+ &irqpin2_device,
|
|
|
+ &irqpin3_device,
|
|
|
&tmu00_device,
|
|
|
&tmu01_device,
|
|
|
&tmu02_device,
|
|
@@ -965,6 +968,8 @@ 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));
|
|
|
|
|
@@ -986,6 +991,8 @@ 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();
|
|
@@ -993,33 +1000,29 @@ void __init r8a7740_add_early_devices(void)
|
|
|
|
|
|
#ifdef CONFIG_USE_OF
|
|
|
|
|
|
-void __init r8a7740_add_early_devices_dt(void)
|
|
|
-{
|
|
|
- shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
|
|
|
-
|
|
|
- early_platform_add_devices(r8a7740_early_devices,
|
|
|
- ARRAY_SIZE(r8a7740_early_devices));
|
|
|
-
|
|
|
- /* setup early console here as well */
|
|
|
- shmobile_setup_console();
|
|
|
-}
|
|
|
-
|
|
|
static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = {
|
|
|
{ }
|
|
|
};
|
|
|
|
|
|
void __init r8a7740_add_standard_devices_dt(void)
|
|
|
{
|
|
|
- /* clocks are setup late during boot in the case of DT */
|
|
|
- r8a7740_clock_init(0);
|
|
|
-
|
|
|
- platform_add_devices(r8a7740_early_devices,
|
|
|
- ARRAY_SIZE(r8a7740_early_devices));
|
|
|
-
|
|
|
+ platform_add_devices(r8a7740_devices_dt,
|
|
|
+ ARRAY_SIZE(r8a7740_devices_dt));
|
|
|
of_platform_populate(NULL, of_default_bus_match_table,
|
|
|
r8a7740_auxdata_lookup, NULL);
|
|
|
}
|
|
|
|
|
|
+void __init r8a7740_init_delay(void)
|
|
|
+{
|
|
|
+ shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
|
|
|
+};
|
|
|
+
|
|
|
+static void __init r8a7740_generic_init(void)
|
|
|
+{
|
|
|
+ r8a7740_clock_init(0);
|
|
|
+ r8a7740_add_standard_devices_dt();
|
|
|
+}
|
|
|
+
|
|
|
static const char *r8a7740_boards_compat_dt[] __initdata = {
|
|
|
"renesas,r8a7740",
|
|
|
NULL,
|
|
@@ -1027,9 +1030,10 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
|
|
|
|
|
|
DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
|
|
|
.map_io = r8a7740_map_io,
|
|
|
- .init_early = r8a7740_add_early_devices_dt,
|
|
|
- .init_irq = r8a7740_init_irq,
|
|
|
- .init_machine = r8a7740_add_standard_devices_dt,
|
|
|
+ .init_early = r8a7740_init_delay,
|
|
|
+ .init_irq = r8a7740_init_irq_of,
|
|
|
+ .init_machine = r8a7740_generic_init,
|
|
|
+ .init_time = shmobile_timer_init,
|
|
|
.dt_compat = r8a7740_boards_compat_dt,
|
|
|
MACHINE_END
|
|
|
|