mirror of https://gitee.com/openkylin/linux.git
[ARM] Fix Versatile PB initialisation to use .init_machine
There's no point having the Versatile PB initialisation using an arch_initcall() and then checking whether it's running on a Versatile PB board - this is what the .init_machine function pointer in the machine description is for. Use it. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
122214428a
commit
4e4e520fd5
|
@ -81,22 +81,18 @@ static struct amba_device *amba_devs[] __initdata = {
|
||||||
&mmc1_device,
|
&mmc1_device,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init versatile_pb_init(void)
|
static void __init versatile_pb_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (machine_is_versatile_pb()) {
|
versatile_init();
|
||||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
|
||||||
struct amba_device *d = amba_devs[i];
|
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||||
amba_device_register(d, &iomem_resource);
|
struct amba_device *d = amba_devs[i];
|
||||||
}
|
amba_device_register(d, &iomem_resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
arch_initcall(versatile_pb_init);
|
|
||||||
|
|
||||||
MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
|
MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
|
||||||
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
||||||
.phys_io = 0x101f1000,
|
.phys_io = 0x101f1000,
|
||||||
|
@ -105,5 +101,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
|
||||||
.map_io = versatile_map_io,
|
.map_io = versatile_map_io,
|
||||||
.init_irq = versatile_init_irq,
|
.init_irq = versatile_init_irq,
|
||||||
.timer = &versatile_timer,
|
.timer = &versatile_timer,
|
||||||
.init_machine = versatile_init,
|
.init_machine = versatile_pb_init,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
Loading…
Reference in New Issue