diff options
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 67288e527..9d9387f10 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -116,42 +116,12 @@ int av7110_num = 0; * DEBI functions ****************************************************************************/ +#define wait_for_debi_done(x) \ + saa7146_wait_for_debi_done(x->dev) \ + /* This DEBI code is based on the Stradis driver by Nathan Laredo <laredo@gnu.org> */ -static int wait_for_debi_done(struct av7110 *av7110) -{ - struct saa7146_dev *dev = av7110->dev; - int start; - - /* wait for registers to be programmed */ - start = jiffies; - while (1) { - if (saa7146_read(dev, MC2) & 2) - break; - if (jiffies-start > HZ/20) { - printk ("%s: timed out while waiting for registers " - "getting programmed\n", __FUNCTION__); - return -ETIMEDOUT; - } - } - - /* wait for transfer to complete */ - start = jiffies; - while (1) { - if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S)) - break; - saa7146_read(dev, MC2); - if (jiffies-start > HZ/4) { - printk ("%s: timed out while waiting for transfer " - "completion\n", __FUNCTION__); - return -ETIMEDOUT; - } - } - - return 0; -} - static int debiwrite(struct av7110 *av7110, u32 config, int addr, u32 val, int count) { |