lgs8gxx: Remove firmware for lgs8g75 and use request_firmware() to load it
svn path=/dists/trunk/linux-2.6/; revision=14536
This commit is contained in:
parent
8be6124957
commit
eb174421b4
|
@ -4,6 +4,8 @@ linux-2.6 (2.6.32~rc5-1) UNRELEASED; urgency=low
|
|||
* New upstream release candidate.
|
||||
* README.Debian: Add brief information about building specific binary
|
||||
packages (Closes: #546182)
|
||||
* lgs8gxx: Remove firmware for lgs8g75 and use request_firmware() to
|
||||
load it
|
||||
|
||||
[ Bastian Blank ]
|
||||
* [mips] Don't force EMBEDDED on.
|
||||
|
|
|
@ -34,6 +34,8 @@ rm arch/powerpc/sysdev/micropatch.c
|
|||
|
||||
rm drivers/media/dvb/dvb-usb/af9005-script.h
|
||||
|
||||
unifdef drivers/media/dvb/frontends/lgs8gxx.c -UREMOVE_DFSG
|
||||
|
||||
rm drivers/infiniband/hw/ipath/ipath_sd7220_img.c
|
||||
|
||||
rm drivers/net/appletalk/cops.c
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
From 15e2cca5411a60ec9d936b36be1bac937f1bfeaa Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Tue, 3 Nov 2009 23:50:20 +0000
|
||||
Subject: [PATCH 18/24] lgs8gxx: mark lgs8g75 as broken and mark firmware for removal
|
||||
|
||||
---
|
||||
drivers/media/dvb/frontends/lgs8gxx.c | 11 +++++++++++
|
||||
1 files changed, 11 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/dvb/frontends/lgs8gxx.c b/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
index eabcadc..a7446fd 100644
|
||||
--- a/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
+++ b/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
@@ -46,6 +46,7 @@ module_param(fake_signal_str, int, 0644);
|
||||
MODULE_PARM_DESC(fake_signal_str, "fake signal strength for LGS8913."
|
||||
"Signal strength calculation is slow.(default:on).");
|
||||
|
||||
+#ifdef REMOVE_DFSG
|
||||
static const u8 lgs8g75_initdat[] = {
|
||||
0x01, 0x30, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
@@ -81,6 +82,7 @@ static const u8 lgs8g75_initdat[] = {
|
||||
0x65, 0xE0, 0x54, 0xFD, 0xF0, 0x22, 0x90, 0x80,
|
||||
0x65, 0xE0, 0x44, 0xC2, 0xF0, 0x22
|
||||
};
|
||||
+#endif
|
||||
|
||||
/* LGS8GXX internal helper functions */
|
||||
|
||||
@@ -625,6 +627,7 @@ static int lgs8913_init(struct lgs8gxx_state *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BROKEN
|
||||
static int lgs8g75_init_data(struct lgs8gxx_state *priv)
|
||||
{
|
||||
const u8 *p = lgs8g75_initdat;
|
||||
@@ -652,6 +655,7 @@ static int lgs8g75_init_data(struct lgs8gxx_state *priv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int lgs8gxx_init(struct dvb_frontend *fe)
|
||||
{
|
||||
@@ -1089,7 +1093,14 @@ struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
|
||||
priv->frontend.demodulator_priv = priv;
|
||||
|
||||
if (config->prod == LGS8GXX_PROD_LGS8G75)
|
||||
+#ifdef CONFIG_BROKEN
|
||||
lgs8g75_init_data(priv);
|
||||
+#else
|
||||
+ {
|
||||
+ dprintk("lgs8g75 firmware not available\n");
|
||||
+ goto error_out;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return &priv->frontend;
|
||||
|
||||
--
|
||||
1.6.5.2
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
From 04a2710a7de7f20ceec7f30c9e56d01d20284b15 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 1 Nov 2009 02:12:10 +0000
|
||||
Subject: [PATCH 20/24] V4L/DVB: lgs8gxx: remove firmware for lgs8g75
|
||||
|
||||
The recently added support for lgs8g75 included some 8051 machine code
|
||||
without accompanying source code. Replace this with use of the
|
||||
firmware loader.
|
||||
|
||||
Compile-tested only.
|
||||
---
|
||||
drivers/media/dvb/frontends/Kconfig | 1 +
|
||||
drivers/media/dvb/frontends/lgs8gxx.c | 23 ++++++++++-------------
|
||||
2 files changed, 11 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/dvb/frontends/Kconfig b/drivers/media/dvb/frontends/Kconfig
|
||||
index d7c4837..26b00ab 100644
|
||||
--- a/drivers/media/dvb/frontends/Kconfig
|
||||
+++ b/drivers/media/dvb/frontends/Kconfig
|
||||
@@ -553,6 +553,7 @@ config DVB_LGS8GL5
|
||||
config DVB_LGS8GXX
|
||||
tristate "Legend Silicon LGS8913/LGS8GL5/LGS8GXX DMB-TH demodulator"
|
||||
depends on DVB_CORE && I2C
|
||||
+ select FW_LOADER
|
||||
default m if DVB_FE_CUSTOMISE
|
||||
help
|
||||
A DMB-TH tuner module. Say Y when you want to support this frontend.
|
||||
diff --git a/drivers/media/dvb/frontends/lgs8gxx.c b/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
index ba74df0..1bfcf85 100644
|
||||
--- a/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
+++ b/drivers/media/dvb/frontends/lgs8gxx.c
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <asm/div64.h>
|
||||
+#include <linux/firmware.h>
|
||||
|
||||
#include "dvb_frontend.h"
|
||||
|
||||
@@ -589,12 +590,16 @@ static int lgs8913_init(struct lgs8gxx_state *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_BROKEN
|
||||
static int lgs8g75_init_data(struct lgs8gxx_state *priv)
|
||||
{
|
||||
- const u8 *p = lgs8g75_initdat;
|
||||
+ const struct firmware *fw;
|
||||
+ int rc;
|
||||
int i;
|
||||
|
||||
+ rc = request_firmware(&fw, "lgs8g75.fw", &priv->i2c->dev);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
lgs8gxx_write_reg(priv, 0xC6, 0x40);
|
||||
|
||||
lgs8gxx_write_reg(priv, 0x3D, 0x04);
|
||||
@@ -605,19 +610,18 @@ static int lgs8g75_init_data(struct lgs8gxx_state *priv)
|
||||
lgs8gxx_write_reg(priv, 0x3B, 0x00);
|
||||
lgs8gxx_write_reg(priv, 0x38, 0x00);
|
||||
|
||||
- for (i = 0; i < sizeof(lgs8g75_initdat); i++) {
|
||||
+ for (i = 0; i < fw->size; i++) {
|
||||
lgs8gxx_write_reg(priv, 0x38, 0x00);
|
||||
lgs8gxx_write_reg(priv, 0x3A, (u8)(i&0xff));
|
||||
lgs8gxx_write_reg(priv, 0x3B, (u8)(i>>8));
|
||||
- lgs8gxx_write_reg(priv, 0x3C, *p);
|
||||
- p++;
|
||||
+ lgs8gxx_write_reg(priv, 0x3C, fw->data[i]);
|
||||
}
|
||||
|
||||
lgs8gxx_write_reg(priv, 0x38, 0x00);
|
||||
|
||||
+ release_firmware(fw);
|
||||
return 0;
|
||||
}
|
||||
-#endif
|
||||
|
||||
static int lgs8gxx_init(struct dvb_frontend *fe)
|
||||
{
|
||||
@@ -1055,14 +1059,7 @@ struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
|
||||
priv->frontend.demodulator_priv = priv;
|
||||
|
||||
if (config->prod == LGS8GXX_PROD_LGS8G75)
|
||||
-#ifdef CONFIG_BROKEN
|
||||
lgs8g75_init_data(priv);
|
||||
-#else
|
||||
- {
|
||||
- dprintk("lgs8g75 firmware not available\n");
|
||||
- goto error_out;
|
||||
- }
|
||||
-#endif
|
||||
|
||||
return &priv->frontend;
|
||||
|
||||
--
|
||||
1.6.5.2
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
+ features/all/drivers-media-dvb-usb-af9005-request_firmware.patch
|
||||
+ features/all/drivers-staging-rt28x0sta-request_firmware.patch
|
||||
+ features/all/export-unionfs-symbols.patch
|
||||
+ features/all/lgs8gxx-lgs8g75-request_firmware.patch
|
||||
+ features/all/sound-pci-cs46xx-request_firmware.patch
|
||||
|
||||
# patches from aufs2 repository, with s/EXPORT_SYMBOL/&_GPL/
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
+ debian/dfsg/drivers-staging-rt3090-disable.patch
|
||||
+ debian/dfsg/drivers-staging-rtl8192su-disable.patch
|
||||
+ debian/dfsg/firmware-cleanup.patch
|
||||
+ debian/dfsg/lgs8gxx-lgs8g75-disable.patch
|
||||
+ debian/dfsg/sound-pci.patch
|
||||
X debian/dfsg/files-1
|
||||
|
||||
# TODO for 2.6.32:
|
||||
# drivers/media/dvb/frontends/lgs8gxx.c: lgs8g75_initdat
|
||||
# drivers/net/r8169.c: phy_reg_init_2 in rtl8168d_{1,2}_hw_phy_config()
|
||||
|
|
Loading…
Reference in New Issue