All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Merging device trees at runtime for module-based systems
Date: Fri, 26 Oct 2012 22:06:22 +0200	[thread overview]
Message-ID: <20121026200622.214792005D6@gemini.denx.de> (raw)
In-Reply-To: <508AD8F9.8030105@wwwdotorg.org>

Dear Stephen Warren,

In message <508AD8F9.8030105@wwwdotorg.org> you wrote:
>
> Simply overlaying two DTBs on top of each-other (in the same fashion
> that dtc's /include/ statement would do at compile-time) might not be
> fully general enough, although perhaps it would be sufficient for your
> immediate needs.

I think it should be sufficient for the overwhelming majority of use
cases.  When designing and implementing this feature, I suggest to
start small with the most common use cases in mind only.

> For example, lets say that a GPIO is routed from a device on the main
> board to a device on a daughter board, or even from one daughter board
> into the main board and back out to a different daughter board. Now,
> consider that the different board(s) that are the source of the GPIO
> might use completely different SoCs or versions of the SoC, which might
> require using a different GPIO specifier to represent the signal. That
> means you need to change the .dtb file for the "client" of the GPIO
> depending on the HW or .dtb that provides the GPIO. That's certainly not
> a simple matter of merging multiple .dtb blobs together.

Yes, one can construct arbitrarily complicated situations.  But I
think it is perfectly reasonable to ignore these, at least for the
initial implementation.

I'm not even convinced that we should try to come up with a solution
that is capable of dealing automtically with any situation of such
complexity.  In reality, we can probably combine a simple overly
mechanism with additional fixup though some shell script running FDT
manipulation commands directly.

> I wonder if similar yet more subtle issues might arise, such as some
> motherboards requiring an active-low IRQ signal yet others requiring an
> active-high IRQ signal, thus requiring a daughter-board to program its
> IRQ source differently. Similarly, what about different drive strength
> requirements for a signal source, depending on what board version
> receives the signal?

I suggest to try to ignore such situations for now, and get started
with a working, simple implementation.  If we actually run into a
situation where handling such situations is needed, we can then
discuss about solutions based on a much beter understanding and
experience with the - then - existing simple code.


In short: let's do a simple, working thing first, and add bells and
whistles later.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A dog always bit deepest on the veterinary hand.
                                    - Terry Pratchett, _Wyrd Sisters_

  reply	other threads:[~2012-10-26 20:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24  9:47 [U-Boot] Merging device trees at runtime for module-based systems Daniel Mack
2012-10-25 12:44 ` Wolfgang Denk
2012-10-25 12:53   ` Daniel Mack
2012-10-25 20:46     ` Wolfgang Denk
2012-10-26  0:53       ` David Gibson
2012-10-26  7:24         ` Daniel Mack
2012-10-26 18:21           ` Simon Glass
2012-11-01  3:26           ` David Gibson
2012-11-01  9:24             ` Daniel Mack
2012-11-03 15:25               ` David Gibson
2012-11-03 15:35                 ` Daniel Mack
2012-10-26 18:39 ` Stephen Warren
2012-10-26 20:06   ` Wolfgang Denk [this message]
2012-10-31 23:00   ` Daniel Mack
2012-10-31 23:00     ` [U-Boot] " Daniel Mack
2012-10-31 23:13     ` Stephen Warren
2012-10-31 23:13       ` [U-Boot] " Stephen Warren
2012-10-31 23:21       ` Daniel Mack
2012-10-31 23:21         ` [U-Boot] " Daniel Mack
     [not found]     ` <5091AD78.3060701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-31 23:56       ` Mitch Bradley
2012-10-31 23:56         ` Mitch Bradley
2012-11-01  4:36         ` Stephen Warren
2012-11-01  4:36           ` [U-Boot] " Stephen Warren
     [not found]           ` <5091FC38.2020806-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-01  5:02             ` Mitch Bradley
2012-11-01  5:02               ` Mitch Bradley
2012-11-02  4:53             ` David Gibson
2012-11-02  4:53               ` David Gibson
2012-11-06 23:05       ` Grant Likely
2012-11-06 23:05         ` Grant Likely

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=20121026200622.214792005D6@gemini.denx.de \
    --to=wd@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.