Skip to content

Commit

Permalink
Merge git://git.infradead.org/~dwmw2/firmware-2.6
Browse files Browse the repository at this point in the history
* git://git.infradead.org/~dwmw2/firmware-2.6:
  qla1280: Fix off-by-some error in firmware loading.
  Add README.AddingFirmware file. Basically telling people not to.
  firmware: Remove newly-added slicoss and sxg firmware images
  firmware/WHENCE: Add missing origin information for Ambassador atmsar11.fw
  ALSA: wavefront - Always use request_firmware()
  Remove fdump tool for av7110 firmware
  firmware: convert av7110 driver to request_firmware()
  Partially revert "V4L/DVB (9533): cx88: Add support for TurboSight TBS8910 DVB-S PCI card"
  Revert "fix modules_install via NFS"

Add-add conflicts in firmware/WHENCE fixed manually
  • Loading branch information
torvalds committed Apr 10, 2009
2 parents d848223 + 0ce49d6 commit 1e17d77
Show file tree
Hide file tree
Showing 27 changed files with 1,238 additions and 26,986 deletions.
23 changes: 5 additions & 18 deletions drivers/media/dvb/ttpci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,12 @@ config DVB_AV7110
download/extract it, and then copy it to /usr/lib/hotplug/firmware
or /lib/firmware (depending on configuration of firmware hotplug).

Say Y if you own such a card and want to use it.

config DVB_AV7110_FIRMWARE
bool "Compile AV7110 firmware into the driver"
depends on DVB_AV7110 && !STANDALONE
default y if DVB_AV7110=y
help
The AV7110 firmware is normally loaded by the firmware hotplug manager.
If you want to compile the firmware into the driver you need to say
Y here and provide the correct path of the firmware. You need this
option if you want to compile the whole driver statically into the
kernel.
Alternatively, you can download the file and use the kernel's
EXTRA_FIRMWARE configuration option to build it into your
kernel image by adding the filename to the EXTRA_FIRMWARE
configuration option string.

All other people say N.

config DVB_AV7110_FIRMWARE_FILE
string "Full pathname of av7110 firmware file"
depends on DVB_AV7110_FIRMWARE
default "/usr/lib/hotplug/firmware/dvb-ttpci-01.fw"
Say Y if you own such a card and want to use it.

config DVB_AV7110_OSD
bool "AV7110 OSD support"
Expand Down
9 changes: 0 additions & 9 deletions drivers/media/dvb/ttpci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,3 @@ obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o

EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
EXTRA_CFLAGS += -Idrivers/media/common/tuners

hostprogs-y := fdump

ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)
$(obj)/av7110.o: $(obj)/av7110_firm.h

$(obj)/av7110_firm.h: $(obj)/fdump
$(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@
endif
16 changes: 0 additions & 16 deletions drivers/media/dvb/ttpci/av7110.c
Original file line number Diff line number Diff line change
Expand Up @@ -1518,20 +1518,6 @@ static int check_firmware(struct av7110* av7110)
return 0;
}

#ifdef CONFIG_DVB_AV7110_FIRMWARE_FILE
#include "av7110_firm.h"
static void put_firmware(struct av7110* av7110)
{
av7110->bin_fw = NULL;
}

static inline int get_firmware(struct av7110* av7110)
{
av7110->bin_fw = dvb_ttpci_fw;
av7110->size_fw = sizeof(dvb_ttpci_fw);
return check_firmware(av7110);
}
#else
static void put_firmware(struct av7110* av7110)
{
vfree(av7110->bin_fw);
Expand Down Expand Up @@ -1580,8 +1566,6 @@ static int get_firmware(struct av7110* av7110)
release_firmware(fw);
return ret;
}
#endif


static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
{
Expand Down
35 changes: 12 additions & 23 deletions drivers/media/dvb/ttpci/av7110_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,29 +198,10 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)

/* we cannot write av7110 DRAM directly, so load a bootloader into
* the DPRAM which implements a simple boot protocol */
static u8 bootcode[] = {
0xea, 0x00, 0x00, 0x0e, 0xe1, 0xb0, 0xf0, 0x0e, 0xe2, 0x5e, 0xf0, 0x04,
0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x08, 0xe2, 0x5e, 0xf0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, 0x00, 0x00, 0xc0
};

int av7110_bootarm(struct av7110 *av7110)
{
const struct firmware *fw;
const char *fw_name = "av7110/bootcode.bin";
struct saa7146_dev *dev = av7110->dev;
u32 ret;
int i;
Expand Down Expand Up @@ -261,7 +242,15 @@ int av7110_bootarm(struct av7110 *av7110)
//saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT);
//saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);

mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode));
ret = request_firmware(&fw, fw_name, &dev->pci->dev);
if (ret) {
printk(KERN_ERR "dvb-ttpci: Failed to load firmware \"%s\"\n",
fw_name);
return ret;
}

mwdebi(av7110, DEBISWAB, DPRAM_BASE, fw->data, fw->size);
release_firmware(fw);
iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);

if (saa7146_wait_for_debi_done(av7110->dev, 1)) {
Expand Down Expand Up @@ -302,7 +291,7 @@ int av7110_bootarm(struct av7110 *av7110)
av7110->arm_ready = 1;
return 0;
}

MODULE_FIRMWARE("av7110/bootcode.bin");

/****************************************************************************
* DEBI command polling
Expand Down
3 changes: 2 additions & 1 deletion drivers/media/dvb/ttpci/av7110_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val,
}

/* buffer writes */
static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, u8 *val, int count)
static inline void mwdebi(struct av7110 *av7110, u32 config, int addr,
const u8 *val, int count)
{
memcpy(av7110->debi_virt, val, count);
av7110_debiwrite(av7110, config, addr, 0, count);
Expand Down
44 changes: 0 additions & 44 deletions drivers/media/dvb/ttpci/fdump.c

This file was deleted.

4 changes: 2 additions & 2 deletions drivers/scsi/qla1280.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)

/* Load RISC code. */
risc_address = ha->fwstart;
fw_data = (const __le16 *)&fw->data[4];
fw_data = (const __le16 *)&fw->data[6];
risc_code_size = (fw->size - 6) / 2;

for (i = 0; i < risc_code_size; i++) {
Expand Down Expand Up @@ -1722,7 +1722,7 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)

/* Load RISC code. */
risc_address = ha->fwstart;
fw_data = (const __le16 *)&fw->data[4];
fw_data = (const __le16 *)&fw->data[6];
risc_code_size = (fw->size - 6) / 2;

dprintk(1, "%s: DMA RISC code (%i) words\n",
Expand Down
1 change: 1 addition & 0 deletions firmware/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.bin
*.csp
*.dsp
ihex2fw
30 changes: 20 additions & 10 deletions firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin
fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
cxgb3/t3c_psram-1.1.0.bin \
cxgb3/t3fw-7.1.0.bin
fw-shipped-$(CONFIG_DVB_AV7110) += av7110/bootcode.bin
fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \
e100/d102e_ucode.bin
Expand All @@ -59,14 +60,9 @@ fw-shipped-$(CONFIG_SND_SB16_CSP) += sb16/mulaw_main.csp sb16/alaw_main.csp \
sb16/ima_adpcm_init.csp \
sb16/ima_adpcm_playback.csp \
sb16/ima_adpcm_capture.csp
fw-shipped-$(CONFIG_SLICOSS) += slicoss/gbdownload.sys slicoss/gbrcvucode.sys \
slicoss/oasisdbgdownload.sys \
slicoss/oasisdownload.sys \
slicoss/oasisrcvucode.sys
fw-shipped-$(CONFIG_SXG) += sxg/saharadownloadB.sys \
sxg/saharadbgdownloadB.sys
fw-shipped-$(CONFIG_SND_YMFPCI) += yamaha/ds1_ctrl.fw yamaha/ds1_dsp.fw \
yamaha/ds1e_ctrl.fw
fw-shipped-$(CONFIG_SND_WAVEFRONT) += yamaha/yss225_registers.bin
fw-shipped-$(CONFIG_TEHUTI) += tehuti/bdx.bin
fw-shipped-$(CONFIG_TIGON3) += tigon/tg3.bin tigon/tg3_tso.bin \
tigon/tg3_tso5.bin
Expand Down Expand Up @@ -123,10 +119,10 @@ quiet_cmd_ihex = IHEX $@
cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@

quiet_cmd_ihex2fw = IHEX2FW $@
cmd_ihex2fw = $(objtree)/scripts/ihex2fw $< $@
cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@

quiet_cmd_h16tofw = H16TOFW $@
cmd_h16tofw = $(objtree)/scripts/ihex2fw -w $< $@
cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@

quiet_cmd_fwbin = MK_FW $@
cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
Expand Down Expand Up @@ -185,15 +181,27 @@ $(patsubst %,$(obj)/%.gen.o, $(fw-external-y)): $(obj)/%.gen.o: $(fwdir)/%
$(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
$(call cmd,ihex)

# Don't depend on ihex2fw if we're installing and it already exists.
# Putting it after | in the dependencies doesn't seem sufficient when
# we're installing after a cross-compile, because ihex2fw has dependencies
# on stuff like /usr/lib/gcc/ppc64-redhat-linux/4.3.0/include/stddef.h and
# thus wants to be rebuilt. Which it can't be, if the prebuilt kernel tree
# is exported read-only for someone to run 'make install'.
ifeq ($(INSTALL):$(wildcard $(obj)/ihex2fw),install:$(obj)/ihex2fw)
ihex2fw_dep :=
else
ihex2fw_dep := $(obj)/ihex2fw
endif

# .HEX is also Intel HEX, but where the offset and length in each record
# is actually meaningful, because the firmware has to be loaded in a certain
# order rather than as a single binary blob. Thus, we convert them into our
# more compact binary representation of ihex records (<linux/ihex.h>)
$(obj)/%.fw: $(obj)/%.HEX | $(objtree)/$(obj)/$$(dir %)
$(obj)/%.fw: $(obj)/%.HEX $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
$(call cmd,ihex2fw)

# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
$(obj)/%.fw: $(obj)/%.H16 $(ihex2fw_dep) | $(objtree)/$(obj)/$$(dir %)
$(call cmd,h16tofw)

$(firmware-dirs):
Expand All @@ -210,3 +218,5 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
# Without this, built-in.o won't be created when it's empty, and the
# final vmlinux link will fail.
obj-n := dummy

hostprogs-y := ihex2fw
34 changes: 34 additions & 0 deletions firmware/README.AddingFirmware
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

DO NOT ADD FIRMWARE TO THIS DIRECTORY.
======================================

This directory is only here to contain firmware images extracted from old
device drivers which predate the common use of request_firmware().

As we update those drivers to use request_firmware() and keep a clean
separation between code and firmware, we put the extracted firmware
here.

This directory is _NOT_ for adding arbitrary new firmware images. The
place to add those is the separate linux-firmware repository:

git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git

That repository contains all these firmware images which have been
extracted from older drivers, as well various new firmware images which
we were never permitted to include in a GPL'd work, but which we _have_
been permitted to redistribute under separate cover.

To submit firmware to that repository, please send either a git binary
diff or preferably a git pull request to:
David Woodhouse <[email protected]>

Your commit should include an update to the WHENCE file clearly
identifying the licence under which the firmware is available, and
that it is redistributable. If the licence is long and involved, it's
permitted to include it in a separate file and refer to it from the
WHENCE file.

Ideally, your commit should contain a Signed-Off-By: from someone
authoritative on the licensing of the firmware in question (i.e. from
within the company that owns the code).
Loading

0 comments on commit 1e17d77

Please sign in to comment.