summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2017-02-25 21:40:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-02 14:03:43 +0100
commitf8d4f622c93bdd2fa0ef89da90caed66525ae0dc (patch)
tree22c790e6762853499fd34b1e1b913e6d6f7a2742 /drivers/bus
parent8a5edc9e99f0326b855f7b07d35f320b58bbdcb3 (diff)
downloadbarebox-f8d4f622c93bdd2fa0ef89da90caed66525ae0dc.tar.gz
barebox-f8d4f622c93bdd2fa0ef89da90caed66525ae0dc.tar.xz
mvebu: dove: simplify soc init code flow
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. The initcall must be postponed to post-core to ensure of_machine_is_compatible is working correctly. The call to mvebu_mbus_add_range is moved to drivers/bus/mvebu-mbus.c to ensure it's registered early enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/mvebu-mbus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index b95c071d57..fc940e3b54 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -811,6 +811,8 @@ static int mvebu_mbus_of_fixup(struct device_node *root, void *context)
return 0;
}
+#define DOVE_REMAP_MC_REGS 0xf1800000
+
static int mvebu_mbus_fixup_register(void)
{
if (IS_ENABLED(CONFIG_ARCH_ARMADA_370) ||
@@ -818,6 +820,13 @@ static int mvebu_mbus_fixup_register(void)
mvebu_mbus_add_range("marvell,armada-370-xp", 0xf0, 0x01,
MVEBU_REMAP_INT_REG_BASE);
+ if (IS_ENABLED(CONFIG_ARCH_DOVE)) {
+ 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(mvebu_mbus_of_fixup, NULL);
}
pure_initcall(mvebu_mbus_fixup_register);