lkml.org 
[lkml]   [2009]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: firmware loading interface
Date
On Friday 13 November 2009, Philip Downer wrote:
> However our device will have flash to store the firmware in and, whilst
> it looks as though it would be possible for us to use request_firmware
> to provide occasional firmware upgrades from userspace, I can't find any
> reference as to whether this is an accepted method for doing so. Could
> someone please confirm for me whether or not it's a good idea to use
> request_firmware for this, or perhaps point me at another standard
> method for doing firmware updates from userspace?

The idea of request_firmware is that it helps you load the firmware
into the device at initialization time so you can use it directly,
without making the firmware blob a part of the kernel driver.

If I understand you correctly, you never need a firmware in user space
in order to use the device, but only for flashing a new version into
the nonvolatile memory.

The easiest way to do that would be an ioctl operation, if you are
implementing a character or block device interface anyway. Just load
the firmware into the RAM of a user application and call an ioctl
with the pointer to the firmware as an argument, but don't use
a data structure with a pointer in it, which would mess up 32 bit
compatibility operation.

If you don't implement a character or block device, the chances are
that you need something else besides an ioctl, depending on how
an application would communicate with your hardware.

Arnd <><


\
 
 \ /
  Last update: 2009-11-13 20:31    [W:0.077 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site