linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: consolidate mpc83xx platform files
Date: Tue, 12 Dec 2006 16:03:04 -0600	[thread overview]
Message-ID: <E8320867-EDC5-42F9-81EE-E66B6D216ADA@kernel.crashing.org> (raw)
In-Reply-To: <457F1F6E.4020502@freescale.com>


On Dec 12, 2006, at 3:30 PM, Scott Wood wrote:

> Benjamin Herrenschmidt wrote:
>> 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 *may* not want to (and they certainly shouldn't be forced to),  
> but
> some may not want to define a new ppc_md (or modify a probe function)
> for every new board if all of the differences are encapsulated in the
> device tree.  I thought one of the main goals of having a device  
> tree is
> that if it's done right, the kernel need not know about every single
> model of board, just the different components that a device tree can
> specify.

That's true, and if that's the case you'd just set your "model" to  
match an existing supported ppc_md.

> If a board has truly board-specific logic that needs custom code in  
> the
> kernel itself (rather than the bootloader), then it can go in as a
> driver with a device tree node (this should be done with the BCSR  
> stuff
> where needed).

This is not always the case, there are times when you have board  
specific modifications you make in the early kernel code.  There are  
a number of different reasons you would want to do this.  The BCSR  
stuff you reference is a Freescale board specific feature.

> What about something like the original patch, but with "mpc83xx- 
> generic"
> (or similar) as the compatible match?  This would address the "matches
> everything with mpc83xx in it" concern, without requiring kernel  
> changes
> when a new device tree is all that's really needed, and without
> requiring non-freescale boards to have something like "fslboards"  
> in the
>   compatible property just in order to use generic platform
> initialization code *if they want to*.  Once the BCSR and RTC stuff is
> (re)moved, there's really not much of anything fslboard-specific in  
> there.

True, but I dont see what the desire is to create a 'generic' 83xx  
support.  Who gets to define what is considered 'generic'?  What  
issue are you guys trying to solve?

Once upon a time I thought the concept of a generic board and such  
was a good thing.  After many a discussion with DanM, I've been  
convinced there isn't that much utility to it in the embedded space :).

If there is some real issue you guys are thinking about, lets talk  
about it.  But the concept of 'generic' 83xx board support is as  
useless waste of time.  I'm all for refactoring code so my board code  
is simpler, but at the end of the day I know there are people that  
are going to need board specific code for their environments.

- kumar

> More generally (and longer-term), what about a completely generic
> platform init file that implements the "booting-without-of.txt"
> platform?  That is, a string that can be placed in the compatible
> property, regardless of board or CPU, in order to assert that nothing
> board-specific has to be done other than as specified by the device
> tree.  The model property could still hold the actual board ID if  
> needed
> to present to the user, or for matching a more specialized machine
> description if problems arise and the device tree cannot be easily
> changed (the generic probe could be arranged to run last).
>
> Alternately, just allow the kernel to boot without finding a matching
> probe, if generic code is able to extract enough information from the
> device tree for generic versions of any non-optional ppc_md  
> functions to
> work.  If a probe does match, then it can fill in any ppc_md fields it
> wants to override (and/or do special initialization, etc).  ppc_md
> fields can also be filled in by CPU-specific code, or by drivers the
> device tree instantiates.
>
> -Scott
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  parent reply	other threads:[~2006-12-12 22:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-09  1:07 [PATCH] powerpc: consolidate mpc83xx platform files Kim Phillips
2006-12-09  7:14 ` Benjamin Herrenschmidt
2006-12-11  3:41   ` Kumar Gala
2006-12-11 21:51     ` Kim Phillips
2006-12-11 22:08       ` Kumar Gala
2006-12-12  2:10         ` Kim Phillips
2006-12-12  2:29           ` Benjamin Herrenschmidt
2006-12-12  2:31             ` Kumar Gala
2006-12-12 21:30             ` Scott Wood
2006-12-12 21:47               ` Benjamin Herrenschmidt
2006-12-12 22:06                 ` Kumar Gala
2006-12-12 22:24                   ` Kim Phillips
2006-12-12 22:28                     ` Kumar Gala
2006-12-12 22:38                       ` Kim Phillips
2006-12-12 22:44                         ` Benjamin Herrenschmidt
2006-12-12 22:51                           ` Kim Phillips
2006-12-12 22:40                       ` Scott Wood
2006-12-13  0:23                         ` Kumar Gala
2006-12-13  5:25                           ` Geoff Thorpe
2006-12-13  6:07                             ` Kumar Gala
2006-12-13 17:48                               ` Geoff Thorpe
2006-12-13 18:21                               ` Kim Phillips
2006-12-13 21:13                               ` Dan Malek
2006-12-12 22:03               ` Kumar Gala [this message]
2006-12-12 22:41                 ` Scott Wood
2006-12-12 22:46                   ` Benjamin Herrenschmidt
2006-12-13  0:20                   ` Kumar Gala
2006-12-18  5:17       ` Paul Mackerras
2006-12-18 17:04         ` Kumar Gala
  -- strict thread matches above, loose matches on Subject: below --
2006-12-12 17:36 Kim Phillips
2006-12-12 18:03 ` Kumar Gala
2006-12-14  1:04 Kim Phillips
2006-12-15 16:09 ` Kumar Gala
2006-12-15 17:23   ` Dan Malek
2006-12-18 21:22     ` Benjamin Herrenschmidt
2006-12-15 17:59   ` Olof Johansson
2006-12-16  1:31     ` Stephen Rothwell
2006-12-18 21:23     ` Benjamin Herrenschmidt
2006-12-18 21:19   ` Benjamin Herrenschmidt
2006-12-18 14:44 Joakim Tjernlund
2006-12-18 16:51 ` Olof Johansson
2006-12-19 21:30 Kim Phillips
2006-12-19 22:19 ` Ben Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E8320867-EDC5-42F9-81EE-E66B6D216ADA@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).