From: Alan Tull <atull@altera.com>
To: Michal Simek <monstr@monstr.eu>
Cc: Pavel Machek <pavel@denx.de>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Jason Cooper <jason@lakedaemon.net>,
Michal Simek <michal.simek@xilinx.com>,
<linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dinh Nguyen <dinguyen@altera.com>,
Philip Balister <philip@balister.org>,
Alessandro Rubini <rubini@gnudd.com>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
Cesar Eduardo Barros <cesarb@cesarb.net>,
Joe Perches <joe@perches.com>,
"David S. Miller" <davem@davemloft.net>,
Stephen Warren <swarren@nvidia.com>,
Arnd Bergmann <arnd@arndb.de>,
David Brown <davidb@codeaurora.org>,
Dom Cobley <popcornmix@gmail.com>
Subject: Re: [RFC PATCH] fpga: Introduce new fpga subsystem
Date: Fri, 20 Sep 2013 15:55:23 -0500 [thread overview]
Message-ID: <1379710523.21515.4.camel@atx-linux-37> (raw)
In-Reply-To: <523AD9C5.8060006@monstr.eu>
On Thu, 2013-09-19 at 13:02 +0200, Michal Simek wrote:
> On 09/19/2013 12:08 PM, Pavel Machek wrote:
> > Hi!
> >
> >> The firmware approach is interesting. It might be less flexible
> >> compared with my original code (see link to git below) that this is
> >
> > On the other hand... that's the interface world wants, right? To most
> > users, fpga bitstream is just a firmware.
>
> It is one nice way how to get data from one place to another and
> it is easy to handle. Using different methods is also possible.
>
> >> Is there some way a per-device userspace helper can be added that can
> >> handle adding the headers? Such that different fpga types get different
> >> helpers?
> >
> > https://www.kernel.org/doc/Documentation/firmware_class/README
> >
> > 4), userspace:
> > - hotplug: cat appropriate_firmware_image > \
> > /sys/class/firmware/xxx/data
> >
> > I assume udev's firmware.sh could be modified to add headers.
> >
> > But... if same bitstream is expected to work across multiple FPGAs (is
> > it?) maybe kernel should hide that difference and provide headers
> > itself.
>
> There could be a configuration where you want to load one bitstream
> to more fpgas with the same type. I can imagine this system and use cases.
>
> Thanks,
> Michal
>
>
Hi Michael,
I have ported the altera fpga manager driver to work with your version
of the fpga manager framework. It works fine if I use the
firmware_class.c's built-in support to load the firmware, but not with a
userspace helper.
I see my helper script get called, but I don't see 'loading' and 'data'
show up under /sys. I have CONFIG_FW_LOADER_USER_HELPER=y enabled and
have done enough printf debugging to see that there was no failure in
creating the attributes as far as firmware_class.c is concerned.
More details:
I'm taking cues from Documentation/firmware_class here.
This is with the 3.11 kernel.
I have CONFIG_FW_LOADER_USER_HELPER=y enabled.
I have this udev rule:
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/hotplug-script"
My hotplug-script is linux/Documentation/firmware_class/hotplug-script
What I am seeing when I request 'image.rbf' is that my hotplug-script
gets run with this DEVPATH set:
DEVPATH == /devices/soc.0/ff706000.fpgamgr/fpga/fpga0/image.rbf
I added debug to my hotplug-script and it could not find 'loading' or
'data' appearing under /sys anywhere when it got called. According to
the firmware_class/README, these should appear under
/sys/class/firmware. However according to the
firmware_class/hotplug-script, they should be under /sys/$DEVPATH.
When I look at firmware_class.c, that code wants these attributes
to show up under the firmware class. Again, with printf debugging,
I don't see firmware_class.c being unhappy until it decides it has
timed out (which happens quickly).
I was wondering what behavior you were seeing with userspace helpers.
Alan
next prev parent reply other threads:[~2013-09-20 20:55 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-18 15:56 [RFC PATCH 0/1] FPGA subsystem core Michal Simek
2013-09-18 15:56 ` [RFC PATCH] fpga: Introduce new fpga subsystem Michal Simek
2013-09-18 16:11 ` Joe Perches
2013-09-19 10:01 ` Michal Simek
2013-09-19 16:26 ` Alan Tull
2013-09-18 19:02 ` Dinh Nguyen
2013-09-19 11:53 ` Michal Simek
2013-09-18 19:15 ` Jason Cooper
2013-09-18 20:32 ` Jason Gunthorpe
2013-09-18 21:17 ` Alan Tull
2013-09-19 10:08 ` Pavel Machek
2013-09-19 11:02 ` Michal Simek
2013-09-20 20:55 ` Alan Tull [this message]
2013-09-24 15:55 ` Alan Tull
2013-09-24 15:58 ` Michal Simek
2013-09-24 16:22 ` Alan Tull
2013-09-24 22:18 ` Greg Kroah-Hartman
2013-09-25 13:55 ` Yves Vandervennet
2013-09-25 14:51 ` Michal Simek
2013-09-25 18:50 ` Alan Tull
2013-09-24 22:54 ` H. Peter Anvin
2013-09-25 10:41 ` Michal Simek
2013-09-25 12:00 ` Pavel Machek
2013-09-25 14:27 ` Philip Balister
2013-09-25 14:43 ` Michal Simek
2013-09-25 19:21 ` Alan Tull
2013-09-19 10:55 ` Michal Simek
2013-09-19 11:17 ` Pavel Machek
2013-09-19 11:22 ` Michal Simek
2013-09-19 12:52 ` /sys rules " Pavel Machek
2013-09-19 14:06 ` Greg KH
2013-09-19 14:10 ` Michal Simek
2013-09-19 14:18 ` Greg KH
2013-09-19 15:14 ` Alan Tull
2013-09-19 14:20 ` Jason Cooper
2013-09-19 14:37 ` Greg KH
2013-09-19 22:48 ` Pavel Machek
[not found] ` <CADuitaA3PLaOgmqXzfMdMDaXg7G6bT-DufjcuhtWfvaoWRj__Q@mail.gmail.com>
2013-09-19 15:14 ` Michal Simek
2013-09-19 15:18 ` Yves Vandervennet
2013-09-19 17:28 ` Jason Gunthorpe
2013-09-23 13:10 ` Michal Simek
2013-09-23 17:10 ` Jason Gunthorpe
2013-09-25 10:48 ` Michal Simek
2013-09-23 13:02 ` Michal Simek
2013-09-19 10:03 ` Pavel Machek
2013-09-19 10:45 ` Michal Simek
2013-09-27 13:31 ` Michal Simek
2013-09-30 17:12 ` Jason Gunthorpe
2013-10-01 15:59 ` Michal Simek
2013-09-18 23:45 ` Ryan Mallon
2013-09-19 11:37 ` Michal Simek
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=1379710523.21515.4.camel@atx-linux-37 \
--to=atull@altera.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=cesarb@cesarb.net \
--cc=davem@davemloft.net \
--cc=davidb@codeaurora.org \
--cc=dinguyen@altera.com \
--cc=gregkh@linuxfoundation.org \
--cc=jason@lakedaemon.net \
--cc=jgunthorpe@obsidianresearch.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=pavel@denx.de \
--cc=philip@balister.org \
--cc=popcornmix@gmail.com \
--cc=rubini@gnudd.com \
--cc=swarren@nvidia.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