[PATCH] powerpc: consolidate mpc83xx platform files
Paul Mackerras
paulus at samba.org
Mon Dec 18 16:17:55 EST 2006
Kim Phillips writes:
> so the contents of 83xx/fsl.c would look like:
> #ifdef CONFIG_MPC834x_SYS
> define_machine(mpc834x_sys) {
> .name = "MPC834x SYS",
> .probe = mpc83xx_probe,
> .setup_arch = mpc83xx_setup_arch,
> .init_IRQ = mpc83xx_init_IRQ,
> .get_irq = ipic_get_irq,
> .restart = mpc83xx_restart,
> .time_init = mpc83xx_time_init,
> .calibrate_decr = generic_calibrate_decr,
> .progress = udbg_progress,
> };
> #else
Why do you have this #else here? Doesn't it just restrict you for no
gain?
> #ifdef CONFIG_MPC834x_ITX
> define_machine(mpc83xx) {
> .name = "MPC834x ITX",
> <rest is the same>
Your probe function can set ppc_md.name to whatever it wants. So you
could have a define_machine(fsl_83xx_eval_board) whose probe function
would pick up the actual board name from the device tree (e.g. the
root node's model property), put that in ppc_md and return 1 (assuming
of course that the device tree looks like one of your boards).
Paul.
More information about the Linuxppc-dev
mailing list