diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-11-30 17:42:20 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-11-30 17:42:20 -0500 |
commit | 4e4e520fd52cfdcc7232c4762a78016e7656cad2 (patch) | |
tree | 38bb0faabb280a6d8983e3978eb0c527d69ea31a | |
parent | 122214428a7bfab2c09b417f3acdb06222e81748 (diff) |
[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>
-rw-r--r-- | arch/arm/mach-versatile/versatile_pb.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 503725b166fc..be439bb9d450 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
@@ -81,22 +81,18 @@ static struct amba_device *amba_devs[] __initdata = { | |||
81 | &mmc1_device, | 81 | &mmc1_device, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static int __init versatile_pb_init(void) | 84 | static void __init versatile_pb_init(void) |
85 | { | 85 | { |
86 | int i; | 86 | int i; |
87 | 87 | ||
88 | if (machine_is_versatile_pb()) { | 88 | versatile_init(); |
89 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | ||
90 | struct amba_device *d = amba_devs[i]; | ||
91 | amba_device_register(d, &iomem_resource); | ||
92 | } | ||
93 | } | ||
94 | 89 | ||
95 | return 0; | 90 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
91 | struct amba_device *d = amba_devs[i]; | ||
92 | amba_device_register(d, &iomem_resource); | ||
93 | } | ||
96 | } | 94 | } |
97 | 95 | ||
98 | arch_initcall(versatile_pb_init); | ||
99 | |||
100 | MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | 96 | MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") |
101 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 97 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
102 | .phys_io = 0x101f1000, | 98 | .phys_io = 0x101f1000, |
@@ -105,5 +101,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | |||
105 | .map_io = versatile_map_io, | 101 | .map_io = versatile_map_io, |
106 | .init_irq = versatile_init_irq, | 102 | .init_irq = versatile_init_irq, |
107 | .timer = &versatile_timer, | 103 | .timer = &versatile_timer, |
108 | .init_machine = versatile_init, | 104 | .init_machine = versatile_pb_init, |
109 | MACHINE_END | 105 | MACHINE_END |