All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
To: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: olpc ofw question
Date: Sat, 14 Aug 2010 20:35:45 -0400	[thread overview]
Message-ID: <20100814203545.4aee7e0f@debxo> (raw)
In-Reply-To: <4C635428.9010009-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>

On Wed, 11 Aug 2010 15:53:44 -1000
Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org> wrote:

[...]
> 
> The "proc_of.c" code that I wrote in Dec 2006 uses the
> package-to-path method mentioned above, getting the "name@addr"
> representation (package-to-path returns the full path, but you can
> easily extract just the tail component with strrchr(path, '/'))


Thanks for the tip.  I changed the code:

-       dp->name = pdt_get_one_property(node, "name");
+//     dp->name = pdt_get_one_property(node, "name");
+       dp->name = pdt_get_fullname(node);

Where pdt_get_fullname() runs package-to-path and returns
strrchr(buf, '/')+1; /proc/device-tree looks much better.
Here's the diff now between /ofw and /proc/device-tree:

http://dev.queued.net/~dilinger/dt2.diff

Now I'm wondering a few things;

1) I'm setting node->name to the full node name now (including
the "@" suffix).  Is there any reason why this might be incorrect
(ie, that I should only be using the @ suffix in node->full_name)?
It looks fine to me, but it's worth asking...

2) At a later point, it's probably worth looking into changing
the sparc code to use this as well.  Is there a reason why the
sparc code doesn't shouldn't use this (ie, old firmware bugs)?

3) I get the following during proc population:

[    0.126687] device-tree: Duplicate name in /, renamed to "dropin-fs#1"

Looking at the diff, I see

-/dropin-fs/.node
-0000000   ` 222 206 377
-0000004
-/dropin-fs/.node
-0000000   ` 222 206 377

Is this a bug in my version of OFW?

  parent reply	other threads:[~2010-08-15  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11  0:40 olpc ofw question Andres Salomon
     [not found] ` <20100810204010.134618fb-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-11 20:48   ` Segher Boessenkool
     [not found]     ` <55307.84.105.60.153.1281559723.squirrel-JorI+TVEvZrY24RiXHRV3ti2O/JbrIOy@public.gmane.org>
2010-08-11 21:20       ` Andres Salomon
     [not found]         ` <20100811172045.77cda7a0-ztAUm9HJea/EueBKFXcDjA@public.gmane.org>
2010-08-12  1:53           ` Mitch Bradley
     [not found]             ` <4C635428.9010009-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-08-15  0:35               ` Andres Salomon [this message]
2010-08-15  1:52                 ` Mitch Bradley

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=20100814203545.4aee7e0f@debxo \
    --to=dilinger-pffuokh25lwstnjn9+bgxg@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=wmb-D5eQfiDGL7eakBO8gow8eQ@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 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.