* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
[not found] ` <18585.31504.836857.829592@cargo.ozlabs.ibm.com>
@ 2008-08-06 13:31 ` Grant Likely
2008-08-06 16:25 ` Segher Boessenkool
2008-08-07 22:35 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 10+ messages in thread
From: Grant Likely @ 2008-08-06 13:31 UTC (permalink / raw)
To: Paul Mackerras; +Cc: devicetree-discuss, miltonm, linuxppc-dev, David Miller
On Wed, Aug 6, 2008 at 4:21 AM, Paul Mackerras <paulus@samba.org> wrote:
> David Miller writes:
>
>> On sparc platforms this is obtained differently. We obtain the 32-bit
>> instance value of "/chosen/stdout" and convert that into a prom device
>> node path using "instance-to-path".
>
> That's actually exactly what we do too, the linux,stdout-path property
> is just a cache of the result of that process. The difference is that
> we have to do it early on while we still have OF around, while you can
> do it later.
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).
g.
>
> Paul.
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
2008-08-06 13:31 ` [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Grant Likely
@ 2008-08-06 16:25 ` Segher Boessenkool
2008-08-06 17:09 ` Mitch Bradley
2008-08-07 0:40 ` David Gibson
2008-08-07 22:35 ` Benjamin Herrenschmidt
1 sibling, 2 replies; 10+ messages in thread
From: Segher Boessenkool @ 2008-08-06 16:25 UTC (permalink / raw)
To: Grant Likely
Cc: linuxppc-dev, devicetree-discuss, Paul Mackerras, David Miller,
miltonm
> 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).
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
2008-08-06 16:25 ` Segher Boessenkool
@ 2008-08-06 17:09 ` Mitch Bradley
2008-08-07 0:40 ` David Gibson
1 sibling, 0 replies; 10+ messages in thread
From: Mitch Bradley @ 2008-08-06 17:09 UTC (permalink / raw)
To: Segher Boessenkool
Cc: linuxppc-dev, devicetree-discuss, David Miller, miltonm
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
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
2008-08-06 16:25 ` Segher Boessenkool
2008-08-06 17:09 ` Mitch Bradley
@ 2008-08-07 0:40 ` David Gibson
1 sibling, 0 replies; 10+ messages in thread
From: David Gibson @ 2008-08-07 0:40 UTC (permalink / raw)
To: Segher Boessenkool
Cc: linuxppc-dev, devicetree-discuss, David Miller, miltonm
On Wed, Aug 06, 2008 at 06:25:48PM +0200, 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).
>
> 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?
Not that I recall. In general we've been avoiding using anything that
traditionally contains an ihandle; hence the direct use of
linux,stdout-path when using a flat tree.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
2008-08-06 13:31 ` [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Grant Likely
2008-08-06 16:25 ` Segher Boessenkool
@ 2008-08-07 22:35 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 2008-08-07 22:35 UTC (permalink / raw)
To: Grant Likely
Cc: devicetree-discuss, miltonm, linuxppc-dev, Paul Mackerras,
David Miller
> 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).
Yup, there are two issues there:
- The instance value would have to be converted to a phandle while
OF is still alive. I initially did that and added a stdout-node or so
property, but that still hit the next issue.
- IBM machines has this weird distinction between the real phandle
and the ibm,phandle, the later being the same except for things
that get hotplugged ... and some of the vdevices. We got really
confused trying to sort that out with the output device.
So in the end, I decided to just convert the ihandle to a path and
stick that path in the device-tree.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <ed82fe3e0808060946v39992095pfb6b85726b7d307d@mail.gmail.com>]
* Re: [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function
@ 2008-08-07 19:20 Milton Miller
2008-08-07 19:22 ` Timur Tabi
0 siblings, 1 reply; 10+ messages in thread
From: Milton Miller @ 2008-08-07 19:20 UTC (permalink / raw)
To: Timur Tabi, Yoder Stuart
Cc: linuxppc-dev, devicetree-discuss, paulus, miltonm, David Gibson
TimurTabi wrote:
> Yoder Stuart wrote:
>
> > The second was the idea that we may need a
> > /aliases/stdin as well. You could conceptually have
> > stdout be a monitor and a stdin be a keyboard.
>
> I don't think the hypervisor console subsystem supports
> this. I don't see any way of registering separate clients
> for input vs. output.
Why should what the hvc driver support have any effect on
what the binding should be?
And anyways, both the boot wrapper and udbg (and hence early
debug console) have totally indepenedent functions for
reading and writing.
And for that matter, we also support output on monitor and
input on keyboard for linear frame buffer on 6xx via the
btext output (but only adb input).
milton
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-08-07 22:35 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080806055214.30717.86092.stgit@trillian.secretlab.ca>
[not found] ` <20080806060239.30717.79273.stgit@trillian.secretlab.ca>
[not found] ` <20080805.233205.201125898.davem@davemloft.net>
[not found] ` <18585.31504.836857.829592@cargo.ozlabs.ibm.com>
2008-08-06 13:31 ` [RFC/PATCH 2/3] of: add of_lookup_stdout() utility function Grant Likely
2008-08-06 16:25 ` Segher Boessenkool
2008-08-06 17:09 ` Mitch Bradley
2008-08-07 0:40 ` David Gibson
2008-08-07 22:35 ` Benjamin Herrenschmidt
[not found] ` <ed82fe3e0808060946v39992095pfb6b85726b7d307d@mail.gmail.com>
[not found] ` <20080807061254.GB12571@yookeroo.seuss>
2008-08-07 17:28 ` Yoder Stuart
2008-08-07 18:11 ` Timur Tabi
2008-08-07 19:20 Milton Miller
2008-08-07 19:22 ` Timur Tabi
[not found] ` <489B4B89.1010507-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2008-08-07 19:38 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox