Re: Board level compatibility matching

2008-08-01 Thread Josh Boyer
On Sat, 02 Aug 2008 08:48:23 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > This is sort of the part that sucks. Look at 44x. There are 10 > > board.c files there. There really only needs to be 3 or 4 (sam440ep, > > warp, virtex, and "generic") because the board files are identi

Re: Board level compatibility matching

2008-08-01 Thread Benjamin Herrenschmidt
On Fri, 2008-08-01 at 08:27 -0600, Grant Likely wrote: > > I agree with most of your argument, except I really have problems with > boards claiming compatibility with an older board. My reason is > exactly the reason you state; One day you'll figure out that there is > indeed a difference. The p

Re: Board level compatibility matching

2008-08-01 Thread Benjamin Herrenschmidt
> This is sort of the part that sucks. Look at 44x. There are 10 > board.c files there. There really only needs to be 3 or 4 (sam440ep, > warp, virtex, and "generic") because the board files are identical in > everything except name. By doing the library code approach, one still > has to create

Re: Board level compatibility matching

2008-08-01 Thread Grant Likely
On Fri, Aug 1, 2008 at 10:01 AM, M. Warner Losh <[EMAIL PROTECTED]> wrote: > I'd float a radical definition of 'compatible' here. > > If the generic code can handle it with just changes to the device > tree, then it is compatible. And by generic code, I wouldn't suggest > a twisty maze of ifdefs o

Re: Board level compatibility matching

2008-08-01 Thread M. Warner Losh
I'd float a radical definition of 'compatible' here. If the generic code can handle it with just changes to the device tree, then it is compatible. And by generic code, I wouldn't suggest a twisty maze of ifdefs or special case hacks. I'm talking truly generic code that is table driven entirely

Re: Board level compatibility matching

2008-08-01 Thread Josh Boyer
On Fri, 1 Aug 2008 08:27:41 -0600 "Grant Likely" <[EMAIL PROTECTED]> wrote: > > NOT HAPPENING. > > > > Now, there are two approaches here that are possible: > > > > - Your board is really pretty much exactly the same as board XXX, > > except maybe you have a different flash size or such, and the

Re: Board level compatibility matching

2008-08-01 Thread Grant Likely
On Fri, Aug 1, 2008 at 6:06 AM, Josh Boyer <[EMAIL PROTECTED]> wrote: > On Fri, 01 Aug 2008 14:25:39 +1000 > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > >> About this whole generic board mumbo-jumbo: not happening. It's a pipe >> dream, it doesn't work, and it leads to the sort of mess we h

Re: Board level compatibility matching

2008-08-01 Thread Grant Likely
On Thu, Jul 31, 2008 at 10:25 PM, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > About this whole generic board mumbo-jumbo: not happening. It's a pipe > dream, it doesn't work, and it leads to the sort of mess we have in chrp > where we end up having hacks to identify what exact sort of chrp

Re: Board level compatibility matching

2008-08-01 Thread Josh Boyer
On Fri, 2008-08-01 at 08:06 -0400, Josh Boyer wrote: > On Fri, 01 Aug 2008 14:25:39 +1000 > Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > About this whole generic board mumbo-jumbo: not happening. It's a pipe > > dream, it doesn't work, and it leads to the sort of mess we have in chrp >

Re: Board level compatibility matching

2008-08-01 Thread Josh Boyer
On Fri, 01 Aug 2008 14:25:39 +1000 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > About this whole generic board mumbo-jumbo: not happening. It's a pipe > dream, it doesn't work, and it leads to the sort of mess we have in chrp > where we end up having hacks to identify what exact sort of chr

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Fri, Aug 01, 2008 at 12:37:25AM -0400, Jon Smirl wrote: > On 8/1/08, David Gibson <[EMAIL PROTECTED]> wrote: > > On Fri, Aug 01, 2008 at 12:00:01AM -0400, Jon Smirl wrote: > > > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > > > > On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrot

Re: Board level compatibility matching

2008-07-31 Thread Jon Smirl
On 8/1/08, David Gibson <[EMAIL PROTECTED]> wrote: > On Fri, Aug 01, 2008 at 12:00:01AM -0400, Jon Smirl wrote: > > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > > > On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrote: > > > > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: >

Re: Board level compatibility matching

2008-07-31 Thread Benjamin Herrenschmidt
About this whole generic board mumbo-jumbo: not happening. It's a pipe dream, it doesn't work, and it leads to the sort of mess we have in chrp where we end up having hacks to identify what exact sort of chrp we have and do things differently etc... NOT HAPPENING. Now, there are two approaches he

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Fri, Aug 01, 2008 at 12:00:01AM -0400, Jon Smirl wrote: > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrote: > > > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: [snip] > > > That is what I'm doing now. But it requires every

Re: Board level compatibility matching

2008-07-31 Thread Jon Smirl
On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrote: > > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > > > On Thu, Jul 31, 2008 at 04:58:34PM -0400, Jon Smirl wrote: > > > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: >

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Thu, Jul 31, 2008 at 09:25:33PM -0600, Grant Likely wrote: > On Fri, Aug 01, 2008 at 12:54:39PM +1000, David Gibson wrote: > > On Thu, Jul 31, 2008 at 02:19:57PM -0600, Grant Likely wrote: [snip] > > > - Add a property to the device tree that explicitly specifies the SoC > > > that the board is

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Thu, Jul 31, 2008 at 11:06:20PM -0400, Jon Smirl wrote: > On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 31, 2008 at 04:58:34PM -0400, Jon Smirl wrote: > > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > > > On Thu, Jul 31, 2008 at 04:49:49PM -0400, Jon Smirl wro

Re: Board level compatibility matching

2008-07-31 Thread Grant Likely
On Fri, Aug 01, 2008 at 12:54:39PM +1000, David Gibson wrote: > On Thu, Jul 31, 2008 at 02:19:57PM -0600, Grant Likely wrote: > > This topic keeps coming up, so it is probably time to address it once > > and for all. > > > > When it comes to machine level support in arch/powerpc, there seems to >

Re: Board level compatibility matching

2008-07-31 Thread Jon Smirl
On 7/31/08, David Gibson <[EMAIL PROTECTED]> wrote: > On Thu, Jul 31, 2008 at 04:58:34PM -0400, Jon Smirl wrote: > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > > On Thu, Jul 31, 2008 at 04:49:49PM -0400, Jon Smirl wrote: > > > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: >

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Thu, Jul 31, 2008 at 02:19:57PM -0600, Grant Likely wrote: > This topic keeps coming up, so it is probably time to address it once > and for all. > > When it comes to machine level support in arch/powerpc, there seems to > me that there are two levels or machine support. > > Level 1 is the boa

Re: Board level compatibility matching

2008-07-31 Thread David Gibson
On Thu, Jul 31, 2008 at 04:58:34PM -0400, Jon Smirl wrote: > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > On Thu, Jul 31, 2008 at 04:49:49PM -0400, Jon Smirl wrote: > > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > > > This topic keeps coming up, so it is probably time to a

Re: Board level compatibility matching

2008-07-31 Thread Grant Likely
On Thu, Jul 31, 2008 at 03:59:06PM -0500, Scott Wood wrote: > On Thu, Jul 31, 2008 at 02:19:57PM -0600, Grant Likely wrote: > > - Add a property to the device tree that explicitly specifies the SoC > > that the board is based on. Something like 'soc-model = > > "fsl,mpc5200b"' would be appropriate

Re: Board level compatibility matching

2008-07-31 Thread Scott Wood
On Thu, Jul 31, 2008 at 02:19:57PM -0600, Grant Likely wrote: > - Add a property to the device tree that explicitly specifies the SoC > that the board is based on. Something like 'soc-model = > "fsl,mpc5200b"' would be appropriate. Shouldn't that go in the compatible property of the soc node? >

Re: Board level compatibility matching

2008-07-31 Thread Jon Smirl
On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > On Thu, Jul 31, 2008 at 04:49:49PM -0400, Jon Smirl wrote: > > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > > This topic keeps coming up, so it is probably time to address it once > > > and for all. > > > > > > When it comes to

Re: Board level compatibility matching

2008-07-31 Thread Grant Likely
On Thu, Jul 31, 2008 at 04:49:49PM -0400, Jon Smirl wrote: > On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > > This topic keeps coming up, so it is probably time to address it once > > and for all. > > > > When it comes to machine level support in arch/powerpc, there seems to > > me that t

Re: Board level compatibility matching

2008-07-31 Thread Jon Smirl
On 7/31/08, Grant Likely <[EMAIL PROTECTED]> wrote: > This topic keeps coming up, so it is probably time to address it once > and for all. > > When it comes to machine level support in arch/powerpc, there seems to > me that there are two levels or machine support. > .. > > Thoughts? > g.

Re: Board level compatibility matching

2008-07-31 Thread Chris Friesen
Grant Likely wrote: Doing so should simplify adding new board ports. In many cases it would just involve dropping in a new .dts file. However, it retains the flexability of overriding generic code with platform specific fixups as the need arises. If it makes it easier for board vendors to do