From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Driver Model and DTS Parsing
Date: Tue, 03 Jun 2014 10:33:03 -0600 [thread overview]
Message-ID: <538DF8BF.4080500@wwwdotorg.org> (raw)
In-Reply-To: <CAPnjgZ1r16y_A6d-XQNS+u_wLoctJkMWetpsYQ7tSFwPYBsvKg@mail.gmail.com>
On 06/03/2014 10:04 AM, Simon Glass wrote:
> +Stephen
I don't think there's anything actionable for me in this email, although
I guess I'll chime in on a couple of points:
I agree that the current way U-Boot parses DT is completely inadequate.
The only way to parse it is to take a top-down recursive approach, with
each node's driver initiating the parsing of any relevant child nodes.
In other words, exactly how Linux (and likely *BSD, Solaris, ...) do it.
I really don't understand the hang up with GPIOs. Here are the possible
HW situations as I see them:
1)
A single GPIO controller HW module, represented as a single DT node.
This should be: One node in DT. One DM device. One bind call (assuming
that's the equivalent of Linux's probe()).
2)
A set of completely separate HW modules, each handling N GPIOs.
This should be: N nodes in DT. N DM devices. N bind calls.
3)
A single HW module that's represented in DT as a top-level node for the
HW module and arbitrarily has N child nodes for some arbitrary bank
concept within the HW module:
This should be: 1 (top-level) node in DT, N child nodes in DT, 1 or N DM
devices, 1 bind call (for just the top-level node). The bind call can
choose whether it creates 1 single DM device object for the top-level
node, or 1 for each of the child node that it manually parses without
additional bind calls. That's an implementation detail in the driver.
Note that Tegra should fall into case (1) above. I'm not familiar enough
with Exynos HW (which was mentioned in the email I'm replying to but
didn't bother quoting) to have an opinion re: which approach is most
suitable for it.
next prev parent reply other threads:[~2014-06-03 16:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 14:49 [U-Boot] Driver Model and DTS Parsing Jon Loeliger
2014-06-03 1:26 ` Simon Glass
2014-06-03 13:39 ` Jon Loeliger
2014-06-03 16:04 ` Simon Glass
2014-06-03 16:33 ` Stephen Warren [this message]
2014-06-12 4:55 ` Simon Glass
2014-06-12 22:31 ` Stephen Warren
2014-07-30 15:26 ` Simon Glass
2014-07-30 15:47 ` Stephen Warren
2014-07-30 16:09 ` Simon Glass
2014-07-30 19:57 ` Stephen Warren
2014-07-31 9:56 ` Simon Glass
2014-07-31 18:04 ` Stephen Warren
2014-08-04 10:22 ` Simon Glass
2014-08-04 17:38 ` Stephen Warren
2014-08-04 20:21 ` Simon Glass
2014-07-31 21:58 ` Simon Glass
2014-07-31 22:54 ` Stephen Warren
2014-08-01 15:42 ` Jon Loeliger
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=538DF8BF.4080500@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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