Similar to the previous commit, this gets rid of a of-fixup which is strange because the soc init stuff is rerun then when a new dt for booting into Linux is loaded. It also only calls mvebu_mbus_add_range if we're running on a Dove. The initcall must be postponed to post-core to ensure of_machine_is_compatible is working correctly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- arch/arm/mach-mvebu/dove.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c index 9a3b05d004d5..54da0d785490 100644 --- a/arch/arm/mach-mvebu/dove.c +++ b/arch/arm/mach-mvebu/dove.c @@ -52,11 +52,16 @@ static void __noreturn dove_restart_soc(struct restart_handler *rst) hang(); } -static int dove_init_soc(struct device_node *root, void *context) +static int dove_init_soc(void) { if (!of_machine_is_compatible("marvell,dove")) return 0; + mvebu_mbus_add_range("marvell,dove", 0xf0, 0x01, + MVEBU_REMAP_INT_REG_BASE); + mvebu_mbus_add_range("marvell,dove", 0xf0, 0x02, + DOVE_REMAP_MC_REGS); + restart_handler_register_fn(dove_restart_soc); barebox_set_model("Marvell Dove"); @@ -67,13 +72,4 @@ static int dove_init_soc(struct device_node *root, void *context) return 0; } - -static int dove_register_soc_fixup(void) -{ - mvebu_mbus_add_range("marvell,dove", 0xf0, 0x01, - MVEBU_REMAP_INT_REG_BASE); - mvebu_mbus_add_range("marvell,dove", 0xf0, 0x02, - DOVE_REMAP_MC_REGS); - return of_register_fixup(dove_init_soc, NULL); -} -pure_initcall(dove_register_soc_fixup); +postcore_initcall(dove_init_soc); -- 2.11.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox