From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: Support ePAPR compliant phandle properties
Date: Wed, 25 Nov 2009 21:40:40 -0700 [thread overview]
Message-ID: <fa686aa40911252040j968cd8dl87ff237904312894@mail.gmail.com> (raw)
In-Reply-To: <20091126043713.GA27334@yookeroo>
On Wed, Nov 25, 2009 at 9:37 PM, David Gibson
<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org> wrote:
> Currently, the Linux kernel, libfdt and dtc, when using flattened
> device trees encode a node's phandle into a property named
> "linux,phandle". The ePAPR specification, however - aiming as it is
> to not be a Linux specific spec - requires that phandles be encoded in
> a property named simply "phandle".
>
> This patch adds support for this newer approach to dtc and libfdt.
> Specifically:
>
> - fdt_get_phandle() will now return the correct phandle if it
> is supplied in either of these properties
>
> - fdt_node_offset_by_phandle() will correctly find a node with
> the given phandle encoded in either property.
>
> - By default, when auto-generating phandles, dtc will encode
> it into both properties for maximum compatibility. A new -H
> option allows either only old-style or only new-style
> properties to be generated.
>
> - If phandle properties are explicitly supplied in the dts
> file, dtc will not auto-generate ones in the alternate format.
>
> - If both properties are supplied, dtc will check that they
> have the same value.
>
> - Some existing testcases are updated to use a mix of old and
> new-style phandles, partially testing the changes.
>
> - A new phandle_format test further tests the libfdt support,
> and the -H option.
Haven't reviewed the code, but the approach seems sound. FWIW, ACK.
g.
next prev parent reply other threads:[~2009-11-26 4:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 4:37 Support ePAPR compliant phandle properties David Gibson
2009-11-26 4:40 ` Grant Likely [this message]
2009-11-26 17:04 ` Rafal Jaworowski
2009-11-26 21:08 ` 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=fa686aa40911252040j968cd8dl87ff237904312894@mail.gmail.com \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=jdl-CYoMK+44s/E@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox