aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-07-18 10:22:35 (GMT)
committerKamil Debski <k.debski@samsung.com>2014-08-05 15:16:35 (GMT)
commit9cf01bfd78a17ca0d7d58e439323ec29881f938c (patch)
tree0cbbfe150c28c80736910924152dabb215fd1d6e
parentd1352f268415182f9bfc06b142fb50083e5f6479 (diff)
coda: fix CODA7541 hardware reset
Do not try to read the CODA960 GDI status register on CODA7541. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com>
-rw-r--r--drivers/media/platform/coda.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 3a6d1d2..ec82dec 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -350,19 +350,22 @@ static int coda_hw_reset(struct coda_ctx *ctx)
idx = coda_read(dev, CODA_REG_BIT_RUN_INDEX);
- timeout = jiffies + msecs_to_jiffies(100);
- coda_write(dev, 0x11, CODA9_GDI_BUS_CTRL);
- while (coda_read(dev, CODA9_GDI_BUS_STATUS) != 0x77) {
- if (time_after(jiffies, timeout))
- return -ETIME;
- cpu_relax();
+ if (dev->devtype->product == CODA_960) {
+ timeout = jiffies + msecs_to_jiffies(100);
+ coda_write(dev, 0x11, CODA9_GDI_BUS_CTRL);
+ while (coda_read(dev, CODA9_GDI_BUS_STATUS) != 0x77) {
+ if (time_after(jiffies, timeout))
+ return -ETIME;
+ cpu_relax();
+ }
}
ret = reset_control_reset(dev->rstc);
if (ret < 0)
return ret;
- coda_write(dev, 0x00, CODA9_GDI_BUS_CTRL);
+ if (dev->devtype->product == CODA_960)
+ coda_write(dev, 0x00, CODA9_GDI_BUS_CTRL);
coda_write(dev, CODA_REG_BIT_BUSY_FLAG, CODA_REG_BIT_BUSY);
coda_write(dev, CODA_REG_RUN_ENABLE, CODA_REG_BIT_CODE_RUN);
ret = coda_wait_timeout(dev);

Privacy Policy