bus: mvebu-mbus: Convert mbus platform driver to direct driver
Registering mbus driver as platform driver is a little late for some register accesses to work. We have to make sure boot-up mbus windows are disabled early, so call mbus driver directly from SoC init. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
5e58563159
commit
60f947b494
|
@ -73,6 +73,7 @@ static int armada_370_xp_init_soc(struct device_node *root, void *context)
|
|||
armada_370_xp_memory_find(&phys_base, &phys_size);
|
||||
|
||||
mvebu_set_memory(phys_base, phys_size);
|
||||
mvebu_mbus_init();
|
||||
|
||||
/* Enable peripherals PUP */
|
||||
reg = readl(ARMADA_XP_PUP_ENABLE_BASE);
|
||||
|
|
|
@ -93,6 +93,7 @@ static int dove_init_soc(struct device_node *root, void *context)
|
|||
dove_memory_find(&phys_base, &phys_size);
|
||||
|
||||
mvebu_set_memory(phys_base, phys_size);
|
||||
mvebu_mbus_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ static int kirkwood_init_soc(struct device_node *root, void *context)
|
|||
kirkwood_memory_find(&phys_base, &phys_size);
|
||||
|
||||
mvebu_set_memory(phys_base, phys_size);
|
||||
mvebu_mbus_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -673,7 +673,7 @@ static void mvebu_mbus_get_pcie_resources(struct device_node *np,
|
|||
}
|
||||
}
|
||||
|
||||
static int mvebu_mbus_probe(struct device_d *dev)
|
||||
int mvebu_mbus_init(void)
|
||||
{
|
||||
struct device_node *np, *controller;
|
||||
const struct of_device_id *match;
|
||||
|
@ -725,18 +725,6 @@ static int mvebu_mbus_probe(struct device_d *dev)
|
|||
return mbus_dt_setup(&mbus_state);
|
||||
}
|
||||
|
||||
static struct driver_d mvebu_mbus_driver = {
|
||||
.probe = mvebu_mbus_probe,
|
||||
.name = "mvebu-mbus",
|
||||
.of_compatible = DRV_OF_COMPAT(mvebu_mbus_dt_ids),
|
||||
};
|
||||
|
||||
static int mvebu_mbus_init(void)
|
||||
{
|
||||
return platform_driver_register(&mvebu_mbus_driver);
|
||||
}
|
||||
postcore_initcall(mvebu_mbus_init);
|
||||
|
||||
struct mbus_range {
|
||||
const char *compatible;
|
||||
u32 mbusid;
|
||||
|
|
|
@ -61,4 +61,6 @@ int mvebu_mbus_del_window(phys_addr_t base, size_t size);
|
|||
void mvebu_mbus_add_range(const char *compatible,
|
||||
u8 target, u8 attr, u32 remap);
|
||||
|
||||
int mvebu_mbus_init(void);
|
||||
|
||||
#endif /* __LINUX_MBUS_H */
|
||||
|
|
Loading…
Reference in New Issue