public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis_blanchard@mentor.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Honor /memory/reg node in DTB files
Date: Wed, 08 Dec 2010 13:08:20 -0800	[thread overview]
Message-ID: <4CFFF3C4.20800@mentor.com> (raw)
In-Reply-To: <20101208205359.6A1DDCF5CA6@gemini.denx.de>

On 12/08/2010 12:53 PM, Wolfgang Denk wrote:
> Dear Hollis Blanchard,
>
> In message<4CFFCEC1.6000103@mentor.com>  you wrote:
>> On 12/07/2010 11:09 AM, Wolfgang Denk wrote:
>>> There are many board vendors who shipt boards with different
>>> configurations - with or without NAND flash; with or without other
>>> peripherals like CAN contollers, LCD, etc.; with different LCD sizes
>>> and types, in portrait or landscape orientation, etc.  Some of these
>>> features can be determined by probing the hardware, others (like the
>>> orientation of a LCD) cannot.  It is sometimes a maintenance nightmare
>>> to provide tens of different configurations of U-Boot for a single
>>> product.  Being able to cinfigure available hardware through the DT,
>>> and using a single common binary image of U-Boot for such systems
>>> would be a great benefit.
>> That's fine, but so far I don't see how it's related. This is
>> information u-boot needs during its own initialization, right?
> Right.
>
>> We need a way for our tools to specify information to the kernels'
>> initialization, and still want u-boot to do all the hardware
>> configuration it does today. It really doesn't matter to us if in the
>> future u-boot uses device trees for that configuration: we just need a
>> way to interact with the kernels.
> When U-boot is supposed to do the hardware initialization, you
> probably include memory initialization, right?  If so, should we then
> not make sure that U-Boot and the OS we're booting use the same
> information about this resource?
Yes, I do include memory initialization. In our use case, u-boot must 
know about all memory (to configure the memory controller), but each OS 
is only made aware of a piece of it. They really do have different 
information about the resource.
> If, on the other hand, you really want to make U-Boot ignore any
> /memory nodes in the device tree, then this should be done straight
> and without additional magic.  In this case the DT should be
> responsible to provide all information the OS needs, and U-Boot should
> not touch this in any way.  Then just do not call fdt_fixup_memory()
> at all for such configurations.
I think the current way that u-boot updates the memory node is valuable 
for other use cases. In particular, it is very convenient for single-OS 
systems. Our goal is to avoid affecting those use cases.
> I dislike the idea that U-Boot will not touch the DT entry in one
> situation, but will do so in another, without any visibility to (and
> eventually without awareness by) the user.
I see it as allowing the user to optionally override auto-detected 
information. The user has to go out of their way to request this 
behavior, so I think the visibility/awareness is there.

The existing bootm_low/bootm_size facility does exactly this, but I 
think we can improve on its design.
> If there is really a good reason for such magic, then this should be
> clearly documented (not only in some comment in some source file),
> and eventually fdt_fixup_memory() (or fdt_fixup_memory_banks() ?)
> should be made weak so it can be redefined by board-specific
> implementations.
>
> In any case, any such changes should be implemented in a generic way,
> i. e. not only for one specific processor family.
I agree that all (device tree aware) systems should behave consistently 
in this regard. Of course, in that case, we don't need weak functions?

Documenting the behavior is a very good point.

Hollis Blanchard
Mentor Graphics, Embedded Systems Division

  reply	other threads:[~2010-12-08 21:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07  0:56 [U-Boot] [PATCH] Honor /memory/reg node in DTB files Deepak Saxena
2010-12-07  6:52 ` Wolfgang Denk
2010-12-07 18:05   ` Deepak Saxena
2010-12-07 19:09     ` Wolfgang Denk
2010-12-08 18:30       ` Hollis Blanchard
2010-12-08 20:53         ` Wolfgang Denk
2010-12-08 21:08           ` Hollis Blanchard [this message]
2010-12-08 21:38             ` Wolfgang Denk
2010-12-08 22:08               ` Dan Malek
2010-12-08 22:34                 ` Wolfgang Denk
2010-12-08 23:33                   ` Peter Tyser
2010-12-08 23:59                   ` Dan Malek
2010-12-09 10:00                     ` Wolfgang Denk
2010-12-10 18:04                   ` Deepak Saxena
2010-12-12 21:19                     ` Wolfgang Denk
2010-12-08 18:59       ` Deepak Saxena
2010-12-08 21:00         ` Wolfgang Denk
2010-12-07 18:40   ` Hollis Blanchard
2010-12-07 19:21     ` Wolfgang Denk
2010-12-07 21:22 ` Scott Wood
2010-12-08 18:59   ` Deepak Saxena
2010-12-08 19:11     ` Scott Wood
2010-12-08 19:22       ` Dan Malek
2010-12-08 19:33         ` Scott Wood
2012-03-31 19:32 ` Marek Vasut

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=4CFFF3C4.20800@mentor.com \
    --to=hollis_blanchard@mentor.com \
    --cc=u-boot@lists.denx.de \
    /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