Commit 72d2c3e0 authored by Kumar Gala's avatar Kumar Gala

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: default avatarKumar Gala <galak@kernel.crashing.org>
parent 1a6a4ffe
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include <asm/kgdb.h> #include <asm/kgdb.h>
#endif #endif
extern void platform_init(void);
extern void bootx_init(unsigned long r4, unsigned long phys); extern void bootx_init(unsigned long r4, unsigned long phys);
boot_infos_t *boot_infos; boot_infos_t *boot_infos;
...@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys) ...@@ -138,12 +137,7 @@ void __init machine_init(unsigned long dt_ptr, unsigned long phys)
strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line)); strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
#endif /* CONFIG_CMDLINE */ #endif /* CONFIG_CMDLINE */
#ifdef CONFIG_PPC_MULTIPLATFORM
probe_machine(); probe_machine();
#else
/* Base init based on machine type. Obsoloete, please kill ! */
platform_init();
#endif
#ifdef CONFIG_6xx #ifdef CONFIG_6xx
if (cpu_has_feature(CPU_FTR_CAN_DOZE) || if (cpu_has_feature(CPU_FTR_CAN_DOZE) ||
......
...@@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void) ...@@ -158,25 +158,25 @@ static int __init mpc834x_rtc_hookup(void)
late_initcall(mpc834x_rtc_hookup); late_initcall(mpc834x_rtc_hookup);
#endif #endif
void __init platform_init(void) /*
* Called very early, MMU is off, device-tree isn't unflattened
*/
static int __init mpc834x_sys_probe(void)
{ {
/* setup the PowerPC module struct */ /* We always match for now, eventually we should look at the flat
ppc_md.setup_arch = mpc834x_sys_setup_arch; dev tree to ensure this is the board we are suppose to run on
*/
ppc_md.init_IRQ = mpc834x_sys_init_IRQ; return 1;
ppc_md.get_irq = ipic_get_irq;
ppc_md.restart = mpc83xx_restart;
ppc_md.time_init = mpc83xx_time_init;
ppc_md.set_rtc_time = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = generic_calibrate_decr;
ppc_md.progress = udbg_progress;
if (ppc_md.progress)
ppc_md.progress("mpc834x_sys_init(): exit", 0);
return;
} }
define_machine(mpc834x_sys) {
.name = "MPC834x SYS",
.probe = mpc834x_sys_probe,
.setup_arch = mpc834x_sys_setup_arch,
.init_IRQ = mpc834x_sys_init_IRQ,
.get_irq = ipic_get_irq,
.restart = mpc83xx_restart,
.time_init = mpc83xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
...@@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m) ...@@ -220,25 +220,25 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024)); seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
} }
void __init platform_init(void) /*
* Called very early, device-tree isn't unflattened
*/
static int __init mpc85xx_ads_probe(void)
{ {
ppc_md.setup_arch = mpc85xx_ads_setup_arch; /* We always match for now, eventually we should look at the flat
ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo; dev tree to ensure this is the board we are suppose to run on
*/
ppc_md.init_IRQ = mpc85xx_ads_pic_init; return 1;
ppc_md.get_irq = mpic_get_irq;
ppc_md.restart = mpc85xx_restart;
ppc_md.power_off = NULL;
ppc_md.halt = NULL;
ppc_md.time_init = NULL;
ppc_md.set_rtc_time = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = generic_calibrate_decr;
ppc_md.progress = udbg_progress;
if (ppc_md.progress)
ppc_md.progress("mpc85xx_ads platform_init(): exit", 0);
} }
define_machine(mpc85xx_ads) {
.name = "MPC85xx ADS",
.probe = mpc85xx_ads_probe,
.setup_arch = mpc85xx_ads_setup_arch,
.init_IRQ = mpc85xx_ads_pic_init,
.show_cpuinfo = mpc85xx_ads_show_cpuinfo,
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment