From: Michael Bohan <mbohan@codeaurora.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: David Daney <ddaney@caviumnetworks.com>,
David Gibson <david@gibson.dropbear.id.au>,
linux-kernel@vger.kernel.org, grant.likely@secretlab.ca,
rob.herring@calxeda.com, ralf@linux-mips.org,
devicetree-discuss@lists.ozlabs.org, david.daney@cavium.com,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] of/lib: Export fdt routines to modules
Date: Thu, 17 Oct 2013 16:51:32 -0700 [thread overview]
Message-ID: <20131017235132.GA6241@codeaurora.org> (raw)
In-Reply-To: <525F6D83.1050808@roeck-us.net>
On Wed, Oct 16, 2013 at 09:54:27PM -0700, Guenter Roeck wrote:
> On 10/16/2013 05:27 PM, Michael Bohan wrote:
> >My motivation is actually to use the fdt format as a firmware.
> >I have a requirement to express driver metadata that's loadable
> >from the filesystem. This data is not reasonable to place in the
> >system Device Tree, since it's application specific and does not
> >actually describe hardware. The fact that the format chosen is
> >'flattened device tree' is merely just a coincidence.
> >
> Still, what prevents you from unflattening it and just using the
> normal device tree functions as David suggested ?
I'm assuming you're suggesting to use of_fdt_unflatten_tree()?
That's an interesting thought. I was planning to scan the fdt
only once and populate my own structures, but I suppose I could
use the of_* APIs equivalently.
It seems there are some problems though. of_fdt_unflatten_tree()
does not return errors, and so for the purposes of my driver it
would not be sufficient to detect an invalid firmware image.
Would people entertain changing this API
(and implicitly __unflatten_device_tree) to return errors? I'm
guessing the reason it's coded that way is because the normal
usecase is 'system boot', at which time errors aren't that
meaningful.
Also, there's no way to free the memory that was allocated from
the unflatten process. May I add one?
Thanks,
Mike
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-10-17 23:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 23:27 [PATCH] of/lib: Export fdt routines to modules Michael Bohan
2013-10-16 23:39 ` David Daney
2013-10-17 0:27 ` Michael Bohan
2013-10-17 4:54 ` Guenter Roeck
2013-10-17 23:51 ` Michael Bohan [this message]
2013-10-18 0:44 ` Guenter Roeck
2013-10-18 2:54 ` Michael Bohan
2013-10-18 13:28 ` Pantelis Antoniou
2013-10-18 15:57 ` Rob Herring
2013-10-18 16:16 ` Guenter Roeck
2013-10-18 16:30 ` David Daney
[not found] ` <52616228.80002-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2013-10-18 19:32 ` Michael Bohan
[not found] ` <20131018193229.GA30141-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-10-18 21:20 ` Rob Herring
2013-10-19 1:49 ` Michael Bohan
2013-10-19 3:41 ` Guenter Roeck
2013-10-18 18:38 ` Mark Rutland
[not found] ` <20131018183804.GA8546-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-10-19 1:41 ` Michael Bohan
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=20131017235132.GA6241@codeaurora.org \
--to=mbohan@codeaurora.org \
--cc=david.daney@cavium.com \
--cc=david@gibson.dropbear.id.au \
--cc=ddaney@caviumnetworks.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=ralf@linux-mips.org \
--cc=rob.herring@calxeda.com \
/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;
as well as URLs for NNTP newsgroup(s).