All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Ditto <mditto@consentry.com>
To: linuxppc-dev@ozlabs.org
Subject: device tree variations
Date: Thu, 16 Oct 2008 17:52:54 -0700	[thread overview]
Message-ID: <48F7E1E6.4040701@consentry.com> (raw)

I'm building a kernel that can run on a handful of hardware
configurations, all using OF-unaware U-Boot.  I know how to make a
static device tree (dts file) that works on one of these hardware
variations, and how to add nodes and modify properties in the platform
init code.  But I don't see a nice way to deal with nodes that should be
present on only some hardware configurations.

I could have the dts file contain only the common elements, and add all
the variable elements in the startup code.  But that means the bulk of
the device tree will be expressed as relatively ugly C source instead of
the much more readable and maintainable dts notation.  I would much
rather have the dts file contain the union of all platforms and have the
platform init code delete the nodes that are not applicable, but I don't
see an API to do those deletions.

I suppose I could instead compile N different dts files and have the
platform init code pick the appropriate dtb blob to pass to fdt_init().

Any suggestions for the best way to do this?

					-=] Mike [=-

             reply	other threads:[~2008-10-17  1:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17  0:52 Mike Ditto [this message]
2008-10-17  1:26 ` device tree variations David Gibson
2008-10-18  2:14   ` Mike Ditto
2008-10-21  1:49     ` David Gibson
2008-10-21  6:00     ` Benjamin Herrenschmidt
2008-10-21 21:32   ` [PATCH] powerpc: Add del_node function to allow early boot code to prune inapplicable devices Mike Ditto
2008-10-21 23:33     ` Grant Likely
2008-10-22  0:23       ` Benjamin Herrenschmidt
2008-10-22  0:25         ` Mike Ditto
2008-10-22  0:09     ` David Gibson

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=48F7E1E6.4040701@consentry.com \
    --to=mditto@consentry.com \
    --cc=linuxppc-dev@ozlabs.org \
    /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.