summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110_hw.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2004-09-20 16:37:45 +0000
committerMichael Hunold <devnull@localhost>2004-09-20 16:37:45 +0000
commit61c72c4891a94b8377b55b655c8253c0ce500f08 (patch)
tree95498cf0fcf6821a9d9548c972424fea3d0f2504 /linux/drivers/media/dvb/ttpci/av7110_hw.c
parentf81e5554d91ce28da5a7c83c3a12772da8782f5f (diff)
downloadmediapointer-dvb-s2-61c72c4891a94b8377b55b655c8253c0ce500f08.tar.gz
mediapointer-dvb-s2-61c72c4891a94b8377b55b655c8253c0ce500f08.tar.bz2
- remove stupid DEB_* debugging macro horror from av7110 and budget drivers, replace them
with dprintk(level, msg) instead - remove whitespace and linefeed violations all over the place
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index f28869162..47f2de3c2 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -110,7 +110,7 @@ void av7110_reset_arm(struct av7110 *av7110)
IER_ENABLE(av7110->dev, MASK_03);
av7110->arm_ready = 1;
- printk("av7110: ARM RESET\n");
+ dprintk(1, "reset ARM\n");
}
@@ -118,7 +118,7 @@ static int waitdebi(struct av7110 *av7110, int adr, int state)
{
int k;
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
for (k = 0; k < 100; k++) {
if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state)
@@ -134,7 +134,7 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
int blocks, rest;
u32 base, bootblock = BOOT_BLOCK;
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
blocks = len / BOOT_MAX_SIZE;
rest = len % BOOT_MAX_SIZE;
@@ -143,7 +143,7 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
for (i = 0; i < blocks; i++) {
if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0)
return -1;
- DEB_D(("Writing DRAM block %d\n", i));
+ dprintk(4, "writing DRAM block %d\n", i);
mwdebi(av7110, DEBISWAB, bootblock,
((char*)data) + i * BOOT_MAX_SIZE, BOOT_MAX_SIZE);
bootblock ^= 0x1400;
@@ -206,7 +206,7 @@ int av7110_bootarm(struct av7110 *av7110)
u32 ret;
int i;
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);
@@ -222,17 +222,17 @@ int av7110_bootarm(struct av7110 *av7110)
/* test DEBI */
iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4);
if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) {
- printk(KERN_ERR "dvb: debi test in av7110_bootarm() failed: "
+ printk(KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: "
"%08x != %08x (check your BIOS hotplug settings)\n",
ret, 0x10325476);
return -1;
}
for (i = 0; i < 8192; i += 4)
iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4);
- DEB_D(("av7110_bootarm: debi test OK\n"));
+ dprintk(2, "debi test OK\n");
/* boot */
- DEB_D(("av7110_bootarm: load boot code\n"));
+ dprintk(1, "load boot code\n");
saa7146_setgpio(dev, ARM_IRQ_LINE, SAA7146_GPIO_IRQLO);
//saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT);
//saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);
@@ -241,25 +241,25 @@ int av7110_bootarm(struct av7110 *av7110)
iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
if (saa7146_wait_for_debi_done(av7110->dev)) {
- printk(KERN_ERR "dvb: av7110_bootarm(): "
+ printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "
"saa7146_wait_for_debi_done() timed out\n");
return -1;
}
saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI);
mdelay(1);
- DEB_D(("av7110_bootarm: load dram code\n"));
+ dprintk(1, "load dram code\n");
if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0)
return -1;
saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);
mdelay(1);
- DEB_D(("av7110_bootarm: load dpram code\n"));
+ dprintk(1, "load dpram code\n");
mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram);
if (saa7146_wait_for_debi_done(av7110->dev)) {
- printk(KERN_ERR "dvb: av7110_bootarm(): "
+ printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "
"saa7146_wait_for_debi_done() timed out after loading DRAM\n");
return -1;
}
@@ -289,10 +289,10 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
u32 stat;
#endif
-// DEB_EE(("av7110: %p\n", av7110));
+// dprintk(4, "%p\n", av7110);
if (!av7110->arm_ready) {
- DEB_D(("arm not ready.\n"));
+ dprintk(1, "arm not ready.\n");
return -1;
}
@@ -300,7 +300,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
- printk(KERN_ERR "%s: timeout waiting for COMMAND idle\n", __FUNCTION__);
+ printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for COMMAND idle\n", __FUNCTION__);
return -1;
}
}
@@ -310,7 +310,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 )) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_SHAKE)) {
- printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n", __FUNCTION__);
+ printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for HANDSHAKE_REG\n", __FUNCTION__);
return -1;
}
}
@@ -320,7 +320,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
while (rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2) & OSDQFull) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
- printk(KERN_ERR "%s: timeout waiting for !OSDQFull\n", __FUNCTION__);
+ printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for !OSDQFull\n", __FUNCTION__);
return -1;
}
}
@@ -339,7 +339,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
- printk(KERN_ERR "%s: timeout waiting for COMMAND to complete\n",
+ printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for COMMAND to complete\n",
__FUNCTION__);
return -1;
}
@@ -347,11 +347,11 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2);
if (stat & GPMQOver) {
- printk(KERN_ERR "%s: GPMQOver\n", __FUNCTION__);
+ printk(KERN_ERR "dvb-ttpci: %s(): GPMQOver\n", __FUNCTION__);
return -1;
}
else if (stat & OSDQOver) {
- printk(KERN_ERR "%s: OSDQOver\n", __FUNCTION__);
+ printk(KERN_ERR "dvb-ttpci: %s(): OSDQOver\n", __FUNCTION__);
return -1;
}
#endif
@@ -363,10 +363,10 @@ int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
{
int ret;
-// DEB_EE(("av7110: %p\n", av7110));
+// dprintk(4, "%p\n", av7110);
if (!av7110->arm_ready) {
- DEB_D(("arm not ready.\n"));
+ dprintk(1, "arm not ready.\n");
return -1;
}
if (down_interruptible(&av7110->dcomlock))
@@ -375,7 +375,7 @@ int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
ret = __av7110_send_fw_cmd(av7110, buf, length);
up(&av7110->dcomlock);
if (ret)
- printk("av7110_send_fw_cmd error\n");
+ printk("dvb-ttpci: %s(): av7110_send_fw_cmd error\n", __FUNCTION__);
return ret;
}
@@ -385,7 +385,7 @@ int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...)
u16 buf[num + 2];
int i, ret;
-// DEB_EE(("av7110: %p\n",av7110));
+// dprintk(4, "%p\n", av7110);
buf[0] = ((type << 8) | com);
buf[1] = num;
@@ -399,7 +399,7 @@ int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...)
ret = av7110_send_fw_cmd(av7110, buf, num + 2);
if (ret)
- printk("av7110_fw_cmd error\n");
+ printk("dvb-ttpci: av7110_fw_cmd error\n");
return ret;
}
@@ -409,7 +409,7 @@ int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len)
u16 cmd[18] = { ((COMTYPE_COMMON_IF << 8) + subcom),
16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
for(i = 0; i < len && i < 32; i++)
{
@@ -421,7 +421,7 @@ int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len)
ret = av7110_send_fw_cmd(av7110, cmd, 18);
if (ret)
- printk("av7110_send_ci_cmd error\n");
+ printk("dvb-ttpci: av7110_send_ci_cmd error\n");
return ret;
}
@@ -435,10 +435,10 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
u32 stat;
#endif
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
if (!av7110->arm_ready) {
- DEB_D(("arm not ready.\n"));
+ dprintk(1, "arm not ready.\n");
return -1;
}
@@ -447,7 +447,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
if ((err = __av7110_send_fw_cmd(av7110, request_buf, request_buf_len)) < 0) {
up(&av7110->dcomlock);
- printk("av7110_fw_request error\n");
+ printk("dvb-ttpci: av7110_fw_request error\n");
return err;
}
@@ -457,7 +457,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
msleep(1);
#endif
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
- printk("%s: timeout waiting for COMMAND to complete\n", __FUNCTION__);
+ printk(KERN_ERR "%s: timeout waiting for COMMAND to complete\n", __FUNCTION__);
up(&av7110->dcomlock);
return -1;
}
@@ -501,7 +501,7 @@ int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length)
int ret;
ret = av7110_fw_request(av7110, &tag, 0, buf, length);
if (ret)
- printk("av7110_fw_query error\n");
+ printk("dvb-ttpci: av7110_fw_query error\n");
return ret;
}
@@ -516,10 +516,10 @@ int av7110_firmversion(struct av7110 *av7110)
u16 buf[20];
u16 tag = ((COMTYPE_REQUEST << 8) + ReqVersion);
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
if (av7110_fw_query(av7110, tag, buf, 16)) {
- printk("DVB: AV7110-%d: ERROR: Failed to boot firmware\n",
+ printk("dvb-ttpci: failed to boot firmware @ card %d\n",
av7110->dvb_adapter->num);
return -EIO;
}
@@ -530,17 +530,17 @@ int av7110_firmversion(struct av7110 *av7110)
av7110->arm_app = (buf[6] << 16) + buf[7];
av7110->avtype = (buf[8] << 16) + buf[9];
- printk("DVB: AV711%d(%d) - firm %08x, rtsl %08x, vid %08x, app %08x\n",
- av7110->avtype, av7110->dvb_adapter->num, av7110->arm_fw,
+ printk("dvb-ttpci: info @ card %d: firm %08x, rtsl %08x, vid %08x, app %08x\n",
+ av7110->dvb_adapter->num, av7110->arm_fw,
av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app);
/* print firmware capabilities */
if (FW_CI_LL_SUPPORT(av7110->arm_app))
- printk("DVB: AV711%d(%d) - firmware supports CI link layer interface\n",
- av7110->avtype, av7110->dvb_adapter->num);
+ printk("dvb-ttpci: firmware @ card %d supports CI link layer interface\n",
+ av7110->dvb_adapter->num);
else
- printk("DVB: AV711%d(%d) - no firmware support for CI link layer interface\n",
- av7110->avtype, av7110->dvb_adapter->num);
+ printk("dvb-ttpci: no firmware support for CI link layer interface @ card %d\n",
+ av7110->dvb_adapter->num);
return 0;
}
@@ -552,7 +552,7 @@ int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long bu
u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC),
16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
if (len > 10)
len = 10;
@@ -569,7 +569,7 @@ int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long bu
buf[i + 4] = msg[i];
if (av7110_send_fw_cmd(av7110, buf, 18))
- printk("av7110_diseqc_send error\n");
+ printk("dvb-ttpci: av7110_diseqc_send error\n");
return 0;
}
@@ -628,7 +628,7 @@ static int FlushText(struct av7110 *av7110)
while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
- printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n",
+ printk(KERN_ERR "dvb-ttpci: %s(): timeout waiting for BUFF1_BASE == 0\n",
__FUNCTION__);
up(&av7110->dcomlock);
return -1;
@@ -652,7 +652,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
- printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n",
+ printk(KERN_ERR "dvb-ttpci: %s: timeout waiting for BUFF1_BASE == 0\n",
__FUNCTION__);
up(&av7110->dcomlock);
return -1;
@@ -663,7 +663,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2)) {
msleep(1);
if (time_after(jiffies, start + ARM_WAIT_SHAKE)) {
- printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n",
+ printk(KERN_ERR "dvb-ttpci: %s: timeout waiting for HANDSHAKE_REG\n",
__FUNCTION__);
up(&av7110->dcomlock);
return -1;
@@ -678,7 +678,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
ret = __av7110_send_fw_cmd(av7110, cbuf, 5);
up(&av7110->dcomlock);
if (ret)
- printk("WriteText error\n");
+ printk("dvb-ttpci: WriteText error\n");
return ret;
}
@@ -741,7 +741,7 @@ static inline int LoadBitmap(struct av7110 *av7110, u16 format,
u8 c;
int ret;
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
ret = wait_event_interruptible_timeout(av7110->bmpq, av7110->bmp_state != BMP_LOADING, HZ);
if (ret == -ERESTARTSYS || ret == 0) {
@@ -794,7 +794,7 @@ static int BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans)
{
int ret;
- DEB_EE(("av7110: %p\n", av7110));
+ dprintk(4, "%p\n", av7110);
BUG_ON (av7110->bmp_state == BMP_NONE);
@@ -812,7 +812,7 @@ static int BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans)
static inline int ReleaseBitmap(struct av7110 *av7110)
{
- DEB_EE(("av7110: %p\n",av7110));
+ dprintk(4, "%p\n", av7110);
if (av7110->bmp_state != BMP_LOADED)
return -1;