diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-03-31 00:39:57 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-03-31 00:39:57 -0500 |
commit | 72d2c3e038fb4846e32cf3f6d66ebd1013329986 (patch) | |
tree | ee76ba636dd4f1f6e8c4d7ee34696adfa5f49f0f /arch | |
parent | 1a6a4ffef6a405f60b51856725074532c9696ac2 (diff) |
powerpc: converted embedded platforms to use new define_machine support
Removed platform_init usage on 83xx and 85xx and use define_machine and
probe(). For now we always return true in the problem since you can only
build for one specific board at a time. This is an artificial constraint.
When we get ride of it we will need to update the Kconfig's for these
sub-arch's and make the board's probe() functions actually do something.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_sys.c | 40 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 40 |
3 files changed, 40 insertions, 46 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index a72bf5dceeee..69ac25701344 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -50,7 +50,6 @@ | |||
50 | #include <asm/kgdb.h> | 50 | #include <asm/kgdb.h> |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | extern void platform_init(void); | ||
54 | extern void bootx_init(unsigned long r4, unsigned long phys); | 53 | extern void bootx_init(unsigned long r4, unsigned long phys); |
55 | 54 | ||
56 | boot_infos_t *boot_infos; | 55 | boot_infos_t *boot_infos; |
@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) | |||
138 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); | 137 | strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); |
139 | #endif /* CONFIG_CMDLINE */ | 138 | #endif /* CONFIG_CMDLINE */ |
140 | 139 | ||
141 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
142 | probe_machine(); | 140 | probe_machine(); |
143 | #else | ||
144 | /* Base init based on machine type. Obsoloete, please kill ! */ | ||
145 | platform_init(); | ||
146 | #endif | ||
147 | 141 | ||
148 | #ifdef CONFIG_6xx | 142 | #ifdef CONFIG_6xx |
149 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || | 143 | if (cpu_has_feature(CPU_FTR_CAN_DOZE) || |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 7c18b4cd5db4..7e789d2420ba 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void) | |||
158 | late_initcall(mpc834x_rtc_hookup); | 158 | late_initcall(mpc834x_rtc_hookup); |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | void __init platform_init(void) | 161 | /* |
162 | * Called very early, MMU is off, device-tree isn't unflattened | ||
163 | */ | ||
164 | static int __init mpc834x_sys_probe(void) | ||
162 | { | 165 | { |
163 | /* setup the PowerPC module struct */ | 166 | /* We always match for now, eventually we should look at the flat |
164 | ppc_md.setup_arch = mpc834x_sys_setup_arch; | 167 | dev tree to ensure this is the board we are suppose to run on |
165 | 168 | */ | |
166 | ppc_md.init_IRQ = mpc834x_sys_init_IRQ; | 169 | return 1; |
167 | ppc_md.get_irq = ipic_get_irq; | ||
168 | |||
169 | ppc_md.restart = mpc83xx_restart; | ||
170 | |||
171 | ppc_md.time_init = mpc83xx_time_init; | ||
172 | ppc_md.set_rtc_time = NULL; | ||
173 | ppc_md.get_rtc_time = NULL; | ||
174 | ppc_md.calibrate_decr = generic_calibrate_decr; | ||
175 | |||
176 | ppc_md.progress = udbg_progress; | ||
177 | |||
178 | if (ppc_md.progress) | ||
179 | ppc_md.progress("mpc834x_sys_init(): exit", 0); | ||
180 | |||
181 | return; | ||
182 | } | 170 | } |
171 | |||
172 | define_machine(mpc834x_sys) { | ||
173 | .name = "MPC834x SYS", | ||
174 | .probe = mpc834x_sys_probe, | ||
175 | .setup_arch = mpc834x_sys_setup_arch, | ||
176 | .init_IRQ = mpc834x_sys_init_IRQ, | ||
177 | .get_irq = ipic_get_irq, | ||
178 | .restart = mpc83xx_restart, | ||
179 | .time_init = mpc83xx_time_init, | ||
180 | .calibrate_decr = generic_calibrate_decr, | ||
181 | .progress = udbg_progress, | ||
182 | }; | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index b7821dbae00d..5eeff370f5fc 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m) | |||
220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); | 220 | seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); |
221 | } | 221 | } |
222 | 222 | ||
223 | void __init platform_init(void) | 223 | /* |
224 | * Called very early, device-tree isn't unflattened | ||
225 | */ | ||
226 | static int __init mpc85xx_ads_probe(void) | ||
224 | { | 227 | { |
225 | ppc_md.setup_arch = mpc85xx_ads_setup_arch; | 228 | /* We always match for now, eventually we should look at the flat |
226 | ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; | 229 | dev tree to ensure this is the board we are suppose to run on |
227 | 230 | */ | |
228 | ppc_md.init_IRQ = mpc85xx_ads_pic_init; | 231 | return 1; |
229 | ppc_md.get_irq = mpic_get_irq; | ||
230 | |||
231 | ppc_md.restart = mpc85xx_restart; | ||
232 | ppc_md.power_off = NULL; | ||
233 | ppc_md.halt = NULL; | ||
234 | |||
235 | ppc_md.time_init = NULL; | ||
236 | ppc_md.set_rtc_time = NULL; | ||
237 | ppc_md.get_rtc_time = NULL; | ||
238 | ppc_md.calibrate_decr = generic_calibrate_decr; | ||
239 | |||
240 | ppc_md.progress = udbg_progress; | ||
241 | |||
242 | if (ppc_md.progress) | ||
243 | ppc_md.progress("mpc85xx_ads platform_init(): exit", 0); | ||
244 | } | 232 | } |
233 | |||
234 | define_machine(mpc85xx_ads) { | ||
235 | .name = "MPC85xx ADS", | ||
236 | .probe = mpc85xx_ads_probe, | ||
237 | .setup_arch = mpc85xx_ads_setup_arch, | ||
238 | .init_IRQ = mpc85xx_ads_pic_init, | ||
239 | .show_cpuinfo = mpc85xx_ads_show_cpuinfo, | ||
240 | .get_irq = mpic_get_irq, | ||
241 | .restart = mpc85xx_restart, | ||
242 | .calibrate_decr = generic_calibrate_decr, | ||
243 | .progress = udbg_progress, | ||
244 | }; | ||