From: Mitch Bradley <wmb@firmworks.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, devicetree-discuss@ozlabs.org,
David Miller <davem@davemloft.net>,
miltonm@bga.com
Subject: Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
Date: Wed, 06 Aug 2008 07:09:41 -1000 [thread overview]
Message-ID: <4899DAD5.9050209@firmworks.com> (raw)
In-Reply-To: <C5C0AA60-C45F-4467-AC76-AA24A00CA4AC@kernel.crashing.org>
Segher Boessenkool wrote:
>> It's not what we do with flattened device trees blobs though. In the
>> flattened tree we're not using a /chosen/stdout property, just the
>> linux,stdout-path one.
>>
>> The question that remains is; should there be? Should the dt blobs
>> use /chosen/stdout also? (I'm not familiar enough with real OF to
>> know the answer. I'm assuming that an instance value is not the same
>> as a phandle).
The difference between a phandle and an ihandle is similar to the
difference between (the inode of) an executable files on disk and (the
process id of) a running process. A phandle refers to the static
information that describes a device, while an ihandle refers to a
particular (out of potentially several) active instantiation of the OFW
driver for that devices. An "instance value" is a data item that can
have a different value for each of the running instances of a given
driver. In the analogy, an instance value is like a data segment variable.
Given an ihandle, you can get the corresponding phandle with
ihandle>phandle. You can't go from phandle to ihandle, because that
direction is one-to-many.
Why you you ever need more than one running instance of a given driver?
For leaf devices, it is pretty rare to have multiple instances.
Multiple instances are more often used for intermediate nodes. The same
intermediate node - for example a usb node - is often the parent of
several leaf nodes that are active simultaneously. When you open a
device, its device tree parents up to the root are implicitly opened.
Each such instance can hold dynamic state on behalf of its children.
>
> ihandles and phandles are not the same thing in OF. Since in the
> "flat world" we cannot have instances, we should use phandles instead
> of ihandles for the things in /chosen. I thought we agreed on that
> already, perhaps I am wrong?
>
>
> Segher
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@ozlabs.org
> https://ozlabs.org/mailman/listinfo/devicetree-discuss
>
next prev parent reply other threads:[~2008-08-06 17:09 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-06 6:02 [RFC/PATCH 0/3] Attempt at making 32bit BAT assignment more intelligent Grant Likely
2008-08-06 6:02 ` [RFC/PATCH 1/3] powerpc: add ioremap_bat() function for setting up BAT translated IO regions Grant Likely
2008-08-06 14:07 ` Kumar Gala
2008-08-06 21:54 ` Grant Likely
2008-08-06 22:11 ` Kumar Gala
2008-08-06 22:28 ` Benjamin Herrenschmidt
2008-08-06 22:55 ` Brad Boyer
2008-08-06 23:11 ` Grant Likely
2008-08-07 1:49 ` Kumar Gala
2008-08-07 22:13 ` Benjamin Herrenschmidt
2008-08-08 0:04 ` Kumar Gala
2008-08-12 19:50 ` Grant Likely
2008-08-06 22:31 ` Scott Wood
2008-08-06 23:02 ` Grant Likely
2008-08-07 1:52 ` Kumar Gala
2008-08-06 22:26 ` Benjamin Herrenschmidt
2008-08-06 23:11 ` Grant Likely
2008-08-07 16:45 ` Scott Wood
2008-08-07 18:21 ` Kumar Gala
2008-08-07 22:09 ` Benjamin Herrenschmidt
2008-08-06 6:02 ` [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Grant Likely
2008-08-06 6:14 ` Michael Ellerman
2008-08-06 6:34 ` Grant Likely
2008-08-06 7:42 ` Stephen Rothwell
2008-08-06 7:44 ` David Miller
2008-08-06 7:57 ` Stephen Rothwell
2008-08-06 6:32 ` David Miller
2008-08-06 6:35 ` Grant Likely
2008-08-06 7:19 ` David Miller
2008-08-07 22:37 ` Benjamin Herrenschmidt
2008-08-06 10:21 ` Paul Mackerras
2008-08-06 10:52 ` David Miller
2008-08-06 13:31 ` Grant Likely
2008-08-06 16:25 ` Segher Boessenkool
2008-08-06 17:09 ` Mitch Bradley [this message]
2008-08-07 0:40 ` David Gibson
2008-08-07 22:35 ` Benjamin Herrenschmidt
2008-08-06 16:46 ` Timur Tabi
2008-08-07 6:12 ` David Gibson
2008-08-07 17:28 ` Yoder Stuart
2008-08-07 17:28 ` Yoder Stuart
2008-08-07 18:11 ` Timur Tabi
2008-08-13 5:41 ` Grant Likely
2008-08-13 14:32 ` Timur Tabi
2008-08-07 22:36 ` Benjamin Herrenschmidt
2008-08-06 6:02 ` [RFC/PATCH 3/3] powerpc/52xx: add udbg and early debug support for PSC serial console Grant Likely
-- strict thread matches above, loose matches on Subject: below --
2008-08-07 19:20 [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Milton Miller
2008-08-07 19:22 ` Timur Tabi
2008-08-07 19:38 ` Scott Wood
2008-08-07 19:38 ` Scott Wood
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=4899DAD5.9050209@firmworks.com \
--to=wmb@firmworks.com \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=miltonm@bga.com \
--cc=segher@kernel.crashing.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.