summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-07-10ttusb-budget: use request_firmware()David Woodhouse5-1648/+843
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-10kaweth: use request_firmware()David Woodhouse8-574/+304
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10smctr: use request_firmware()David Woodhouse6-1001/+526
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: convert ymfpci driver to use firmware loader exclusivelyDavid Woodhouse8-1638/+1562
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: convert maestro3 driver to use firmware loader exclusivelyDavid Woodhouse6-181/+187
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: convert korg1212 driver to use firmware loader exclusivelyDavid Woodhouse6-1015/+1007
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ihex: Add support for long records to ihex2fw.cDavid Woodhouse2-19/+47
Some drivers could do with using records like Intel HEX, but with each record being larger than 256 bytes. This has been possible in the binary representation (struct ihex_binrec) in the kernel since the beginning -- at least of the the current version of history. But we haven't been able to represent that in the .HEX files which get converted to .fw files. This adds a '-w' option to ihex2fw to make it interpret the first _two_ bytes of each line as the record length, instead of only one byte. And adds makefile rules for %.H16->%.fw which use that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ihex: add ihex2fw tool for converting HEX files into firmware imagesDavid Woodhouse3-1/+262
Not the straight conversion to binary which objcopy can do for us, but actually representing each record with its original {addr, length}, because some drivers need that information preserved. Fix up 'firmware_install' to be able to build $(hostprogs-y) too. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ihex: request_ihex_firmware() function to load and validate firmwareDavid Woodhouse1-0/+24
Provide a helper to load the file and validate it in one call, to simplify error handling in the drivers which are going to use it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ihex.h: binary representation of ihex recordsDavid Woodhouse1-0/+50
Some devices need their firmware as a set of {address, len, data...} records in some specific order rather than a simple blob. The normal way of doing this kind of thing is 'ihex', which is a text format and not entirely suitable for use in the kernel. This provides a binary representation which is very similar, but much more compact -- and a helper routine to skip to the next record, because the alignment constraints mean that everybody will screw it up for themselves otherwise. Also a helper function which can verify that a 'struct firmware' contains a valid set of ihex records, and that following them won't run off the end of the loaded data. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: Add firmware installation to modules_install, add firmware_installDavid Woodhouse3-7/+75
For 'make modules_install', install any firmware required by the modules which are being installed. Also add a 'make firmware_install' target which doesn't depend on the configuration, but installs _all_ available in-kernel-tree firmware into $(INSTALL_FW_PATH), which defaults to /lib/firmware. This is intended for distributors to make arch-independent (and config-independent) packages containing firmware. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10firmware: Add CONFIG_FIRMWARE_IN_KERNEL option.David Woodhouse2-0/+30
This will control whether we build firmware into the kernel image for _every_ driver which we convert to request_firmware(), to avoid a proliferation of 'CONFIG_XXX_FIRMWARE' options for each one. Default to 'y' for now, which is the wrong thing to do but people seem to be insisting on it and refusing to even review patches until it's done. And it does preserve the existing behaviour for built-in drivers. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: Add CONFIG_EXTRA_FIRMWARE optionDavid Woodhouse3-1/+128
This allows arbitrary firmware files to be included in the static kernel where the firmware loader can find them without requiring userspace to be alive. (Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from Johannes Berg). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2008-07-10firmware: allow firmware files to be built into kernel imageDavid Woodhouse3-2/+59
Some drivers have their own hacks to bypass the kernel's firmware loader and build their firmware into the kernel; this renders those unnecessary. Other drivers don't use the firmware loader at all, because they always want the firmware to be available. This allows them to start using the firmware loader. A third set of drivers already use the firmware loader, but can't be used without help from userspace, which sometimes requires an initrd. This allows them to work in a static kernel. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10firmware: make fw->data constDavid Woodhouse2-2/+2
In preparation for supporting firmware files linked into the static kernel, make fw->data const to ensure that users aren't modifying it (so that we can pass a pointer to the original in-kernel copy, rather than having to copy it). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10Fix a const pointer usage warning in the Digigram miXart soundcard driverDavid Howells1-1/+1
Fix a const pointer usage warning in the Digigram miXart soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier is part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10Fix a const pointer usage warning in the Digigram pcxhr soundcard driverDavid Howells1-1/+1
Fix a const pointer usage warning in the Digigram pcxhr compatible soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier is part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10Fix a const pointer error in the Conexant cx23418 MPEG encoder driverDavid Howells1-1/+1
Fix a const pointer to non-const pointer assignment error in the Conexant cx23418 MPEG encoder driver. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10Fix a const assignment in moxa_load_fw()David Howells1-2/+2
Fix an assignment of a const pointer to a non-const pointer in moxa_load_fw(). Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10Fix a const pointer usage warning in the Digigram VX soundcard driverDavid Howells1-1/+1
Fix a const pointer usage warning in the Digigram VX soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier will be part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-10isight: treat firmware data as constgregkh@suse.de1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10x86 microcode: firmware data is constGreg Kroah-Hartman1-2/+2
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10dell_rbu: firmware data is constGreg Kroah-Hartman1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ymfpci: treat firmware data as constDavid Woodhouse1-25/+34
Standardise both in-kernel and loaded firmware to be stored as little-endian instead of host-endian. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10maestro3: treat firmware data as constDavid Woodhouse1-14/+15
The maestro3 driver is byte-swapping its firmware to be host-endian in advance, when it doesn't seem to be necessary -- we could just use le16_to_cpu() as we load it. Doing that means that we need to switch the in-tree firmware to be little-endian too. Take the least intrusive way of doing this, which is to switch the existing snd_m3_convert_from_le() function to convert _to_ little-endian instead, and use it on the in-tree firmware instead of the loaded firmware. It's a bit suboptimal but doesn't matter much right now because we're about to remove the special cases for the in-tree version anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10tuners: treat firmware data as constDavid Woodhouse2-2/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10gp8psk: treat firmware data as constDavid Woodhouse1-1/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10cxusb: treat firmware data as constDavid Woodhouse1-3/+18
...which means allocating our own copy when we want to modify it. (stupid thinko fixed by mkrufky) Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-07-10dvb frontends: treat firmware data as constDavid Woodhouse7-9/+11
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ttusb-dec: treat firmware data as constDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10bt8xx: treat firmware data as constDavid Woodhouse1-1/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10cxgb3: treat firmware data as constDavid Woodhouse2-5/+7
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10irda-usb: treat firmware data as constDavid Woodhouse1-6/+6
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10atmel: treat firmware data as constDavid Woodhouse1-3/+3
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10p54: treat firmware data as constDavid Woodhouse1-2/+3
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10rt2x00: treat firmware data as constDavid Woodhouse4-8/+8
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10zd1201: treat firmware data as constDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10aic94xx: treat firmware data as constDavid Woodhouse3-11/+12
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10cxacru: treat firmware data as constDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10ueagle-atm: treat firmware data as constDavid Woodhouse1-9/+11
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10vx: treat firmware data as constDavid Woodhouse1-2/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10pcxhr: treat firmware data as constDavid Woodhouse1-2/+2
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10riptide: treat firmware data as constDavid Woodhouse1-5/+5
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10vx222: treat firmware data as constDavid Woodhouse1-1/+1
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10myri10ge: treat firmware data as constDavid Woodhouse1-2/+9
... which means allocating our own buffer for reading it back. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10cx25840: treat firmware data as constDavid Woodhouse1-16/+11
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Tyler Trafford <ttrafford@gmail.com> Acked-by: Mike Isely <isely@pobox.com>
2008-07-10cyclades: treat firmware data as constDavid Woodhouse1-5/+5
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10bluetooth: treat firmware data as constDavid Woodhouse2-2/+4
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10libertas: treat firmware data as constDavid Woodhouse3-5/+5
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-09Merge branch 'for-linus' of ↵Linus Torvalds1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: RDMA/cxgb3: Fix regression caused by class_device -> device conversion