summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-11-20 10:50:15 +0000
committerMichael Hunold <devnull@localhost>2003-11-20 10:50:15 +0000
commitbbff4037e33929d1353b8f065862d9fc66ef05a9 (patch)
tree9c54699a1dc4072a7d6660b81928b26e15a5c623 /linux/drivers/media/dvb/ttpci/av7110.c
parent73ee18fbc6b15911cd9c4f47bc90d2212e2d09dd (diff)
downloadmediapointer-dvb-s2-bbff4037e33929d1353b8f065862d9fc66ef05a9.tar.gz
mediapointer-dvb-s2-bbff4037e33929d1353b8f065862d9fc66ef05a9.tar.bz2
- move saa7146_set_gpio() from saa7146_vv to saa7146_core
- add "new" saa7146_wait_for_debi_done() function, remove other versions from av7110 and budget.ci - make budget-ci use this gpio function and the new wait_...() function, therefore fix BORROWED_FROM_AV7110_H_BUT_REALLY_BELONGS_IN_SAA7146_DEFS_H remark
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c36
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)
{