From: Segher Boessenkool <segher@kernel•crashing.org>
To: "Yoder Stuart-B08248" <stuart.yoder@freescale•com>
Cc: Linux PPC Dev ML <linuxppc-dev@ozlabs•org>,
Jon Loeliger <jdl@jdl•com>,
David Gibson <david@gibson•dropbear.id.au>
Subject: Re: macros and dtc
Date: Tue, 20 Feb 2007 14:15:00 +0100 [thread overview]
Message-ID: <f17b2e4ee4a9f92709e3de9f246e4943@kernel.crashing.org> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA302A1C2F1@az33exm25.fsl.freescale.net>
> There are lot's of hardcoded constants floating around
> in the dts files that for clarity should be #defined (or
> whatever the m4 equivalent is) at the top of the file.
For *clarity*, they should be bare constants :-)
For maintainability, values that are not changing ever
(fixed addresses on some SoC for example) are fine as
a constant; they never change, after all. Addresses
that are configurable though (PCI ranges for example)
could benefit from a macro def. Then again, such things
should ideally be filled in by the boot wrapper instead
(for PCI, this means the boot wrapper would need to know
how to do PCI config on your PHB; it then could automatically
generate almost all of the PCI tree). Well this is not
the best example I guess, Linux can do without the PCI
stuff in the tree, but the same idea goes for many other
features that can be probed; you have one basic DTB for
a whole family of boards and the boot wrapper fills in
the details. It would be useful then (and now already)
to have some /proc/flatdevtree that outputs the binary
blob that the kernel was fed -- someone create that please :-)
Segher
next prev parent reply other threads:[~2007-02-20 13:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 16:58 macros and dtc Kumar Gala
2007-02-19 15:51 ` Geoff Levand
2007-02-19 18:07 ` Dan Malek
2007-02-19 18:57 ` Yoder Stuart-B08248
2007-02-19 20:16 ` Dan Malek
2007-02-19 21:06 ` Yoder Stuart-B08248
2007-02-20 13:15 ` Segher Boessenkool [this message]
2007-02-19 19:28 ` Kumar Gala
2007-02-19 20:04 ` Benjamin Herrenschmidt
2007-02-19 23:29 ` 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=f17b2e4ee4a9f92709e3de9f246e4943@kernel.crashing.org \
--to=segher@kernel$(echo .)crashing.org \
--cc=david@gibson$(echo .)dropbear.id.au \
--cc=jdl@jdl$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=stuart.yoder@freescale$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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