From: David Gibson <david@gibson.dropbear.id.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] libfdt release?
Date: Tue, 16 Oct 2007 17:19:19 +1000 [thread overview]
Message-ID: <20071016071919.GB30425@localhost.localdomain> (raw)
In-Reply-To: <47146244.2020302@grandegger.com>
On Tue, Oct 16, 2007 at 09:03:32AM +0200, Wolfgang Grandegger wrote:
> David Gibson wrote:
> >On Mon, Oct 15, 2007 at 09:21:54PM +0200, Wolfgang Grandegger wrote:
> >>Kumar Gala wrote:
> >>>Guys,
> >>>
> >>>Can you tell me where we stand on changes/additions to libfdt vs u-
> >>>boot. I'd really like to see an updated libfdt imported into u-boot
> >>>for the next window and am happy to work on the u-boot modifications
> >>>as long as I understand what exactly they are.
> >>>
> >>>Having fdt_get_name() and fdt_get_path() will be really useful for
> >>>some fixup of device node code I've got and will allow us to drop the
> >>>hard coded/explicit PATHs to nodes from <config.h>.
> >>>
> >>>I'd rather see us take a clean libfdt drop rather than pulling in
> >>>bits and pieces.
> >>Yes, that would be nice but the libfdt for U-Boot may still need to be
> >>extended, especially for dynamic configuration. Therefore I would
> >>appreciate a discussion on what else we need for that purpose and how we
> >>handle (separate) common and extended libfdt functions for U-Boot. For
> >
> >Again, I'm happy to add functionality to core libfdt if u-boot needs
> >it (as long as it isn't fundamentally u-boot specific, of course).
>
> The functions below are not really U-Boot specific.
Sure, and we have nearly all of them.
> >>the dynamic configuration, I'm clearly in favor of function names
> >>similar to the one commonly used in Linux (with the prefix fdt:):
> >>
> >> of_find_node_by_path
> >> of_find_node_by_type
> >> of_find_node_by_phandle
> >> of_find_compatible_node
> >> of_device_is_compatible
> >> of_get_property
> >
> >Tough. The names I have are staying for the reasons I've already
> >mentioned. And because I want to keep the libfdt API reasonably
> >stable.
>
> OK, just my personal opinion on gratuitous name changes. What functions
> are missing in the libfdt? How can I help to get them ported to the
> generic libfdt?
There are functions for all of these, either already in libfdt, or
included in a patch I sent to jdl today.
* of_find_node_by_path => fdt_path_offset()
* of_find_node_by_type => fdt_node_offset_by_prop_value()
* of_find_node_by_phandle => fdt_node_offset_by_prop_value()
Although I suspect the only reason u-boot needs the first of these is
because of the broken early Freescale bindings which use device_type
in ways they shouldn't.
* of_find_compatible_node => fdt_node_offset_by_compatible()
* of_device_is_compatible => fdt_node_check_compatible()
Both in today's patch to jdl. Beware that fdt_node_check_compatible()
has reversed sense from of_device_is_compatible() (returns 0 if the
node *is* compatible). That's so it can return error codes in the
normal way if passed a junk tree or offset.
--
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
next prev parent reply other threads:[~2007-10-16 7:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <006E3CAD-11CB-4892-8BDB-9866677F371D@freescale.com>
[not found] ` <20071010061458.GA6135@localhost.localdomain>
[not found] ` <912BB32E-FD7D-4CBC-AE3D-3D358E97DECB@freescale.com>
[not found] ` <20071011041239.GF14873@localhost.localdomain>
[not found] ` <9917D225-2082-4900-BFD4-96490EA88C42@freescale.com>
2007-10-11 23:35 ` [U-Boot-Users] libfdt release? Jerry Van Baren
2007-10-11 23:56 ` Detlev Zundel
2007-10-12 4:28 ` David Gibson
2007-10-12 7:16 ` Wolfgang Grandegger
2007-10-15 3:20 ` David Gibson
2007-10-12 11:58 ` Jerry Van Baren
2007-10-15 4:12 ` David Gibson
2007-10-15 18:30 ` Kumar Gala
2007-10-15 18:51 ` Jerry Van Baren
2007-10-15 19:03 ` Kumar Gala
2007-10-15 19:23 ` Jerry Van Baren
2007-10-15 21:50 ` Kumar Gala
2007-10-15 19:21 ` Wolfgang Grandegger
2007-10-16 2:44 ` David Gibson
2007-10-16 7:03 ` Wolfgang Grandegger
2007-10-16 7:19 ` David Gibson [this message]
2007-10-23 14:39 ` Kumar Gala
2007-10-23 23:51 ` David Gibson
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=20071016071919.GB30425@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--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 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.