aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJaswinder Singh <jaswinder@infradead.org>2008-06-22 08:54:19 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-04-06 17:34:44 -0400
commit4f8d182513690b42b20fb81e487be4cd4729e27c (patch)
tree15f9ca9b4a59e1facec2460ca9eadde15d9646f0 /drivers
parent9137f05f7e72517d44b6b0c15b11b419ecb5d201 (diff)
Remove fdump tool for av7110 firmware
There's no point in this, since the user can use the BUILTIN_FIRMWARE option to include arbitrary firmware files directly in the kernel image. Thanks to David Woodhouse for help. Signed-off-by: Jaswinder Singh <jaswinder@infradead.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/ttpci/Kconfig23
-rw-r--r--drivers/media/dvb/ttpci/Makefile9
-rw-r--r--drivers/media/dvb/ttpci/av7110.c16
-rw-r--r--drivers/media/dvb/ttpci/fdump.c44
4 files changed, 5 insertions, 87 deletions
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index 772990415f99..68eb4493f991 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -28,25 +28,12 @@ config DVB_AV7110
28 download/extract it, and then copy it to /usr/lib/hotplug/firmware 28 download/extract it, and then copy it to /usr/lib/hotplug/firmware
29 or /lib/firmware (depending on configuration of firmware hotplug). 29 or /lib/firmware (depending on configuration of firmware hotplug).
30 30
31 Say Y if you own such a card and want to use it. 31 Alternatively, you can download the file and use the kernel's
32 32 EXTRA_FIRMWARE configuration option to build it into your
33config DVB_AV7110_FIRMWARE 33 kernel image by adding the filename to the EXTRA_FIRMWARE
34 bool "Compile AV7110 firmware into the driver" 34 configuration option string.
35 depends on DVB_AV7110 && !STANDALONE
36 default y if DVB_AV7110=y
37 help
38 The AV7110 firmware is normally loaded by the firmware hotplug manager.
39 If you want to compile the firmware into the driver you need to say
40 Y here and provide the correct path of the firmware. You need this
41 option if you want to compile the whole driver statically into the
42 kernel.
43 35
44 All other people say N. 36 Say Y if you own such a card and want to use it.
45
46config DVB_AV7110_FIRMWARE_FILE
47 string "Full pathname of av7110 firmware file"
48 depends on DVB_AV7110_FIRMWARE
49 default "/usr/lib/hotplug/firmware/dvb-ttpci-01.fw"
50 37
51config DVB_AV7110_OSD 38config DVB_AV7110_OSD
52 bool "AV7110 OSD support" 39 bool "AV7110 OSD support"
diff --git a/drivers/media/dvb/ttpci/Makefile b/drivers/media/dvb/ttpci/Makefile
index 71451237294c..8a4d5bb20a5b 100644
--- a/drivers/media/dvb/ttpci/Makefile
+++ b/drivers/media/dvb/ttpci/Makefile
@@ -19,12 +19,3 @@ obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
19 19
20EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ 20EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
21EXTRA_CFLAGS += -Idrivers/media/common/tuners 21EXTRA_CFLAGS += -Idrivers/media/common/tuners
22
23hostprogs-y := fdump
24
25ifeq ($(CONFIG_DVB_AV7110_FIRMWARE),y)
26$(obj)/av7110.o: $(obj)/av7110_firm.h
27
28$(obj)/av7110_firm.h: $(obj)/fdump
29 $(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@
30endif
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 4624cee93e74..d1d959ed37b7 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1518,20 +1518,6 @@ static int check_firmware(struct av7110* av7110)
1518 return 0; 1518 return 0;
1519} 1519}
1520 1520
1521#ifdef CONFIG_DVB_AV7110_FIRMWARE_FILE
1522#include "av7110_firm.h"
1523static void put_firmware(struct av7110* av7110)
1524{
1525 av7110->bin_fw = NULL;
1526}
1527
1528static inline int get_firmware(struct av7110* av7110)
1529{
1530 av7110->bin_fw = dvb_ttpci_fw;
1531 av7110->size_fw = sizeof(dvb_ttpci_fw);
1532 return check_firmware(av7110);
1533}
1534#else
1535static void put_firmware(struct av7110* av7110) 1521static void put_firmware(struct av7110* av7110)
1536{ 1522{
1537 vfree(av7110->bin_fw); 1523 vfree(av7110->bin_fw);
@@ -1580,8 +1566,6 @@ static int get_firmware(struct av7110* av7110)
1580 release_firmware(fw); 1566 release_firmware(fw);
1581 return ret; 1567 return ret;
1582} 1568}
1583#endif
1584
1585 1569
1586static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params) 1570static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend_parameters *params)
1587{ 1571{
diff --git a/drivers/media/dvb/ttpci/fdump.c b/drivers/media/dvb/ttpci/fdump.c
deleted file mode 100644
index c90001d35e7d..000000000000
--- a/drivers/media/dvb/ttpci/fdump.c
+++ /dev/null
@@ -1,44 +0,0 @@
1#include <stdio.h>
2#include <sys/types.h>
3#include <sys/stat.h>
4#include <fcntl.h>
5#include <unistd.h>
6
7int main(int argc, char **argv)
8{
9 unsigned char buf[8];
10 unsigned int i, count, bytes = 0;
11 FILE *fd_in, *fd_out;
12
13 if (argc != 4) {
14 fprintf(stderr, "\n\tusage: %s <ucode.bin> <array_name> <output_name>\n\n", argv[0]);
15 return -1;
16 }
17
18 fd_in = fopen(argv[1], "rb");
19 if (fd_in == NULL) {
20 fprintf(stderr, "firmware file '%s' not found\n", argv[1]);
21 return -1;
22 }
23
24 fd_out = fopen(argv[3], "w+");
25 if (fd_out == NULL) {
26 fprintf(stderr, "cannot create output file '%s'\n", argv[3]);
27 return -1;
28 }
29
30 fprintf(fd_out, "\n#include <asm/types.h>\n\nu8 %s [] = {", argv[2]);
31
32 while ((count = fread(buf, 1, 8, fd_in)) > 0) {
33 fprintf(fd_out, "\n\t");
34 for (i = 0; i < count; i++, bytes++)
35 fprintf(fd_out, "0x%02x, ", buf[i]);
36 }
37
38 fprintf(fd_out, "\n};\n\n");
39
40 fclose(fd_in);
41 fclose(fd_out);
42
43 return 0;
44}