Re: [PATCH] powerpc: consolidate mpc83xx platform files
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2006-12-12 02:29:38
how else is platform_probe going to find the right match? it's either that, or adding _probe()s for each platform.
Well, either you want all freescale boards have one platform. in which case you write one ppc_md() structure, call it mpc83xx_fslboards or something like that, and have a probe routine that test for all matches, or create as many ppc_md structures as you have boards each with it's own probe(). The point here is that other developpers making their own mpc83xx based boards will not want to use your ppc_md. They will have differences and those differences will be handled in their board support code via different hooks in ppc_md. It's goot if you provide them "generic" things they can use in mpc83xx.c for areas where they don't differ from the freescale reference implementations, but don't make the fsl board support code try to match on everything that has a mpc83xx in it ! Thus, make sure that your DTs for the fsl boards have clear identification (via the model or compatible property at the root of the tree is the usual way of doing so) and have a ppc_md or several, as you like, match specifically those boards. Also, make that ppc_md live in a different file that doesn't have to be compiled along with the generic mpc83xx code. That way, embedded developpers have the choice of either building a multiplatform kernel that supports their board -and- fsl ones, or a tailored kernel for their board that doesn't include the fsl specific stuff, all depending on config options. Ben.