diff options
author | Johannes Stezenbach <devnull@localhost> | 2005-01-01 18:49:41 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2005-01-01 18:49:41 +0000 |
commit | fa178869c7f6ebc68f1b012c9ae65f352801850d (patch) | |
tree | 3d4ab9c282d912365d57295e27b1ed76db70009a /linux/drivers/media/dvb/ttpci/av7110_hw.c | |
parent | dd730f8ac72ed4d7ae45c0e9fdc83147e0cd56c0 (diff) | |
download | mediapointer-dvb-s2-fa178869c7f6ebc68f1b012c9ae65f352801850d.tar.gz mediapointer-dvb-s2-fa178869c7f6ebc68f1b012c9ae65f352801850d.tar.bz2 |
some more error messages to detect broken cards
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_hw.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c index 67a95df63..78bba6d41 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_hw.c +++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c @@ -153,8 +153,10 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len) base = DRAM_START_CODE; for (i = 0; i < blocks; i++) { - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) + if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at block %d\n", i); return -1; + } dprintk(4, "writing DRAM block %d\n", i); mwdebi(av7110, DEBISWAB, bootblock, ((char*)data) + i * BOOT_MAX_SIZE, BOOT_MAX_SIZE); @@ -166,8 +168,10 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len) } if (rest > 0) { - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) + if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at last block\n"); return -1; + } if (rest > 4) mwdebi(av7110, DEBISWAB, bootblock, ((char*)data) + i * BOOT_MAX_SIZE, rest); @@ -179,12 +183,16 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len) iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, rest, 2); iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); } - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) + if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { + printk(KERN_ERR "dvb-ttpci: load_dram(): timeout after last block\n"); return -1; + } iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, 0, 2); iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); - if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BOOT_COMPLETE) < 0) + if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BOOT_COMPLETE) < 0) { + printk(KERN_ERR "dvb-ttpci: load_dram(): final handshake timeout\n"); return -1; + } return 0; } @@ -261,8 +269,11 @@ int av7110_bootarm(struct av7110 *av7110) mdelay(1); dprintk(1, "load dram code\n"); - if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) + if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) { + printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): " + "load_dram() failed\n"); return -1; + } saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO); mdelay(1); |