@@ -54,9 +54,8 @@ static const char *kzm9g_boards_compat_d
};
DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
- .smp = smp_ops(sh73a0_smp_ops),
.map_io = sh73a0_map_io,
- .init_early = sh73a0_init_delay,
+ .init_early = sh73a0_init_early,
.init_machine = kzm_init,
.dt_compat = kzm9g_boards_compat_dt,
MACHINE_END
@@ -904,7 +904,6 @@ static const char *kzm9g_boards_compat_d
};
DT_MACHINE_START(KZM9G_DT, "kzm9g")
- .smp = smp_ops(sh73a0_smp_ops),
.map_io = sh73a0_map_io,
.init_early = sh73a0_add_early_devices,
.nr_irqs = NR_IRQS_LEGACY,
@@ -71,7 +71,7 @@ enum {
#define SH73A0_PINT0_IRQ(irq) ((irq) + 700)
#define SH73A0_PINT1_IRQ(irq) ((irq) + 732)
-extern void sh73a0_init_delay(void);
+extern void sh73a0_init_early(void);
extern void sh73a0_init_irq(void);
extern void sh73a0_map_io(void);
extern void sh73a0_earlytimer_init(void);
@@ -919,9 +919,12 @@ void __init sh73a0_add_standard_devices(
ARRAY_SIZE(sh73a0_late_devices));
}
-void __init sh73a0_init_delay(void)
+void __init sh73a0_init_early(void)
{
shmobile_setup_delay(1196, 44, 46); /* Cortex-A9 @ 1196MHz */
+#ifdef CONFIG_SMP
+ smp_set_ops(&sh73a0_smp_ops);
+#endif
}
/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
@@ -929,7 +932,6 @@ void __init __weak sh73a0_register_twd(v
void __init sh73a0_earlytimer_init(void)
{
- sh73a0_init_delay();
sh73a0_clock_init();
shmobile_earlytimer_init();
sh73a0_register_twd();
@@ -937,6 +939,8 @@ void __init sh73a0_earlytimer_init(void)
void __init sh73a0_add_early_devices(void)
{
+ sh73a0_init_early();
+
early_platform_add_devices(sh73a0_devices_dt,
ARRAY_SIZE(sh73a0_devices_dt));
early_platform_add_devices(sh73a0_early_devices,
@@ -954,9 +958,8 @@ static const char *sh73a0_boards_compat_
};
DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
- .smp = smp_ops(sh73a0_smp_ops),
.map_io = sh73a0_map_io,
- .init_early = sh73a0_init_delay,
+ .init_early = sh73a0_init_early,
.dt_compat = sh73a0_boards_compat_dt,
MACHINE_END
#endif /* CONFIG_USE_OF */