Skip to content

Commit

Permalink
V4L/DVB (12928): SAA7164: Increase firmware load tolerance
Browse files Browse the repository at this point in the history
It's timing out and aborting firmware load too quickly on some
platforms, this increases the upper limit.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 1a6450d commit f4a6adf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/media/video/saa7164/saa7164-fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ int saa7164_dl_wait_ack(struct saa7164_dev *dev, u32 reg)
{
u32 timeout = SAA_DEVICE_TIMEOUT;
while ((saa7164_readl(reg) & 0x01) == 0) {
timeout -= 5;
timeout -= 10;
if (timeout == 0) {
printk(KERN_ERR "%s() timeout (no d/l ack)\n",
__func__);
return -EBUSY;
}
/* TODO: Review this for efficiency, f/w load is slow */
msleep(1);
msleep(100);
}

return 0;
Expand All @@ -57,14 +56,13 @@ int saa7164_dl_wait_clr(struct saa7164_dev *dev, u32 reg)
{
u32 timeout = SAA_DEVICE_TIMEOUT;
while (saa7164_readl(reg) & 0x01) {
timeout -= 5;
timeout -= 10;
if (timeout == 0) {
printk(KERN_ERR "%s() timeout (no d/l clr)\n",
__func__);
return -EBUSY;
}
/* TODO: Review this for efficiency, f/w load is slow */
msleep(1);
msleep(100);
}

return 0;
Expand Down

0 comments on commit f4a6adf

Please sign in to comment.