Re: [PATCH] powerpc: consolidate mpc83xx platform files
From: Paul Mackerras <hidden>
Date: 2006-12-18 05:17:55
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,
};
#elseWhy 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.