summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110_hw.c
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2004-11-15 22:26:50 +0000
committerOliver Endriss <devnull@localhost>2004-11-15 22:26:50 +0000
commit886f158ab03849eeacb0d7fdd552773209682741 (patch)
tree546bd6062e0f4933dbc4a165f46267dad29dbc3c /linux/drivers/media/dvb/ttpci/av7110_hw.c
parentd3d09e17ff71b19ea41a1d6455724452c7704786 (diff)
downloadmediapointer-dvb-s2-886f158ab03849eeacb0d7fdd552773209682741.tar.gz
mediapointer-dvb-s2-886f158ab03849eeacb0d7fdd552773209682741.tar.bz2
added some error messages for debi debugging
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index 48926948a..707c2f4d7 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -53,10 +53,14 @@ int av7110_debiwrite(struct av7110 *av7110, u32 config,
{
struct saa7146_dev *dev = av7110->dev;
- if (count <= 0 || count > 32764)
+ if (count <= 0 || count > 32764) {
+ printk("%s: invalid count %d\n", __FUNCTION__, count);
return -1;
- if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0)
+ }
+ if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) {
+ printk("%s: wait_for_debi_done failed\n", __FUNCTION__);
return -1;
+ }
saa7146_write(dev, DEBI_CONFIG, config);
if (count <= 4) /* immediate transfer */
saa7146_write(dev, DEBI_AD, val);
@@ -72,10 +76,14 @@ u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, int count)
struct saa7146_dev *dev = av7110->dev;
u32 result = 0;
- if (count > 32764 || count <= 0)
+ if (count > 32764 || count <= 0) {
+ printk("%s: invalid count %d\n", __FUNCTION__, count);
return 0;
- if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0)
+ }
+ if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) {
+ printk("%s: wait_for_debi_done #1 failed\n", __FUNCTION__);
return 0;
+ }
saa7146_write(dev, DEBI_AD, av7110->debi_bus);
saa7146_write(dev, DEBI_COMMAND, (count << 17) | 0x10000 | (addr & 0xffff));
@@ -83,7 +91,11 @@ u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, int count)
saa7146_write(dev, MC2, (2 << 16) | 2);
if (count > 4)
return count;
- saa7146_wait_for_debi_done(av7110->dev, 0);
+ if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) {
+ printk("%s: wait_for_debi_done #2 failed\n", __FUNCTION__);
+ return 0;
+ }
+
result = saa7146_read(dev, DEBI_AD);
result &= (0xffffffffUL >> ((4 - count) * 8));
return result;