summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c12
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c22
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_v4l.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-av.c4
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c4
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.c2
6 files changed, 25 insertions, 21 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 178167405..9a100f837 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -154,7 +154,7 @@ static void recover_arm(struct av7110 *av7110)
DEB_EE(("av7110: %p\n",av7110));
av7110_bootarm(av7110);
- dvb_delay(100);
+ msleep(100);
restart_feeds(av7110);
av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir_config);
}
@@ -176,7 +176,11 @@ static int arm_thread(void *data)
DEB_EE(("av7110: %p\n",av7110));
- dvb_kernel_thread_setup("arm_mon");
+ lock_kernel ();
+ daemonize ("arm_mon");
+ sigfillset (&current->blocked);
+ unlock_kernel ();
+
av7110->arm_thread = current;
while (1) {
@@ -1576,7 +1580,7 @@ err3:
av7110->arm_rmmod = 1;
wake_up_interruptible(&av7110->arm_wait);
while (av7110->arm_thread)
- dvb_delay(1);
+ msleep(1);
err2:
av7110_ca_exit(av7110);
av7110_av_exit(av7110);
@@ -1611,7 +1615,7 @@ static int av7110_detach (struct saa7146_dev* saa)
wake_up_interruptible(&av7110->arm_wait);
while (av7110->arm_thread)
- dvb_delay(1);
+ msleep(1);
dvb_unregister(av7110);
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index 60adc4eda..f28869162 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -102,7 +102,7 @@ void av7110_reset_arm(struct av7110 *av7110)
saa7146_write(av7110->dev, ISR, (MASK_19 | MASK_03));
saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTHI);
- dvb_delay(30); /* the firmware needs some time to initialize */
+ msleep(30); /* the firmware needs some time to initialize */
ARM_ResetMailBox(av7110);
@@ -264,7 +264,7 @@ int av7110_bootarm(struct av7110 *av7110)
return -1;
}
saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI);
- dvb_delay(30); /* the firmware needs some time to initialize */
+ msleep(30); /* the firmware needs some time to initialize */
//ARM_ClearIrq(av7110);
ARM_ResetMailBox(av7110);
@@ -298,7 +298,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
printk(KERN_ERR "%s: timeout waiting for COMMAND idle\n", __FUNCTION__);
return -1;
@@ -308,7 +308,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
#ifndef _NOHANDSHAKE
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 )) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_SHAKE)) {
printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n", __FUNCTION__);
return -1;
@@ -318,7 +318,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2) & OSDQFull) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
printk(KERN_ERR "%s: timeout waiting for !OSDQFull\n", __FUNCTION__);
return -1;
@@ -337,7 +337,7 @@ int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
#ifdef COM_DEBUG
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2 )) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
printk(KERN_ERR "%s: timeout waiting for COMMAND to complete\n",
__FUNCTION__);
@@ -454,7 +454,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2)) {
#ifdef _NOHANDSHAKE
- dvb_delay(1);
+ msleep(1);
#endif
if (time_after(jiffies, start + ARM_WAIT_FREE)) {
printk("%s: timeout waiting for COMMAND to complete\n", __FUNCTION__);
@@ -466,7 +466,7 @@ int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
#ifndef _NOHANDSHAKE
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2 )) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_SHAKE)) {
printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n", __FUNCTION__);
up(&av7110->dcomlock);
@@ -626,7 +626,7 @@ static int FlushText(struct av7110 *av7110)
return -ERESTARTSYS;
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n",
__FUNCTION__);
@@ -650,7 +650,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2)) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_OSD)) {
printk(KERN_ERR "%s: timeout waiting for BUFF1_BASE == 0\n",
__FUNCTION__);
@@ -661,7 +661,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
#ifndef _NOHANDSHAKE
start = jiffies;
while (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2)) {
- dvb_delay(1);
+ msleep(1);
if (time_after(jiffies, start + ARM_WAIT_SHAKE)) {
printk(KERN_ERR "%s: timeout waiting for HANDSHAKE_REG\n",
__FUNCTION__);
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
index 213871506..c1d800f3f 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -508,7 +508,7 @@ int av7110_init_analog_module(struct av7110 *av7110)
printk("av7110(%d): DVB-C analog module detected, initializing MSP3400\n",
av7110->dvb_adapter->num);
av7110->adac_type = DVB_ADAC_MSP;
- dvb_delay(100); // the probing above resets the msp...
+ msleep(100); // the probing above resets the msp...
msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1);
msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2);
printk("av7110(%d): MSP3400 version 0x%04x 0x%04x\n",
diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c
index 3e1f57e83..5bc672824 100644
--- a/linux/drivers/media/dvb/ttpci/budget-av.c
+++ b/linux/drivers/media/dvb/ttpci/budget-av.c
@@ -176,7 +176,7 @@ static int budget_av_detach (struct saa7146_dev *dev)
if ( 1 == budget_av->has_saa7113 ) {
saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTLO);
- dvb_delay(200);
+ msleep(200);
saa7146_unregister_device (&budget_av->vd, dev);
}
@@ -224,7 +224,7 @@ static int budget_av_attach (struct saa7146_dev* dev,
//test_knc_ci(av7110);
saa7146_setgpio(dev, 0, SAA7146_GPIO_OUTHI);
- dvb_delay(500);
+ msleep(500);
if ( 0 == saa7113_init(budget_av) ) {
budget_av->has_saa7113 = 1;
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index afe51a149..fdf150920 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -322,7 +322,7 @@ static int ciintf_slot_reset(struct dvb_ca_en50221* ca, int slot) {
saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQHI);
budget_ci->slot_status = SLOTSTATUS_RESET;
budget_debiwrite(budget_ci, DEBICICTL, DEBIADDR_CICONTROL, 1, 0);
- dvb_delay(1);
+ msleep(1);
budget_debiwrite(budget_ci, DEBICICTL, DEBIADDR_CICONTROL, 1, CICONTROL_RESET);
saa7146_setgpio(saa, 1, SAA7146_GPIO_OUTHI);
@@ -482,7 +482,7 @@ static void ciintf_deinit(struct budget_ci* budget_ci)
saa7146_setgpio(saa, 0, SAA7146_GPIO_INPUT);
tasklet_kill(&budget_ci->ciintf_irq_tasklet);
budget_debiwrite(budget_ci, DEBICICTL, DEBIADDR_CICONTROL, 1, 0);
- dvb_delay(1);
+ msleep(1);
budget_debiwrite(budget_ci, DEBICICTL, DEBIADDR_CICONTROL, 1, CICONTROL_RESET);
// disable TS data stream to CI interface
diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c
index 9bee908c7..4a4750383 100644
--- a/linux/drivers/media/dvb/ttpci/budget.c
+++ b/linux/drivers/media/dvb/ttpci/budget.c
@@ -100,7 +100,7 @@ static int SendDiSEqCMsg (struct budget *budget, int len, u8 *msg, unsigned long
udelay(12500);
saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO);
}
- dvb_delay(20);
+ msleep(20);
}
return 0;