[PATCH] powerpc: consolidate mpc83xx platform files

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Dec 9 18:14:50 EST 2006


On Fri, 2006-12-08 at 19:07 -0600, Kim Phillips wrote:
> Eliminate code redundancy.  mpc83[246]x_{mds,itx,sys,pb} files merged
> into a single setup.c.  machine_probe, instead of using the model property,
> checks the compatible property for "MPC83xx" (dts files updated appropriately).
> This patch also utilizes of_platform_bus_probe() in lieu of manually
> calling of_platform_device_create for each ucc_geth device.
> 
> Signed-off-by: Kim Phillips <kim.phillips at freescale.com>

I am not completely certain this is the right approach.

While factoring code is good, I think that every single board should
have it's own ppc_md, though you can definitely provide "common"
functions for mpc83xx that can optinally be used by those different
boards.

Maybe put all the freescale ones in one file if you want...

The rationale here is that while your approach is fine for your eval
boards, I don't think it's good for embedded customers. They may want
more complex platforms, with their own directory even if they have a lot
of custom stuff on the board while still possibly picking some of your
"common" code (and their board shouldn't match your overly generic
probe() implementation).

Cheers,
Ben.





More information about the Linuxppc-dev mailing list