summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-11-03 00:25:06 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-18 08:44:40 (GMT)
commitc768626479187f1fcc3697e5f150b7af259c657c (patch)
treeac37c15523f023e3b4d24a9b37b7b7d694c35e03 /drivers/media
parentc01d568e7f835ed429145670e8876fddff2f99ba (diff)
downloadlinux-c768626479187f1fcc3697e5f150b7af259c657c.tar.xz
[media] v4l: atmel-isi: Reset the ISI when starting the stream
The queue setup operation isn't the right place to reset the ISI. Move the reset call to the start streaming operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/soc_camera/atmel-isi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c
index ea8816c..ae2c8c1 100644
--- a/drivers/media/platform/soc_camera/atmel-isi.c
+++ b/drivers/media/platform/soc_camera/atmel-isi.c
@@ -241,16 +241,6 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
struct atmel_isi *isi = ici->priv;
unsigned long size;
- int ret;
-
- /* Reset ISI */
- ret = atmel_isi_wait_status(isi, WAIT_ISI_RESET);
- if (ret < 0) {
- dev_err(icd->parent, "Reset ISI timed out\n");
- return ret;
- }
- /* Disable all interrupts */
- isi_writel(isi, ISI_INTDIS, ~0UL);
size = icd->sizeimage;
@@ -390,6 +380,16 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
struct atmel_isi *isi = ici->priv;
u32 sr = 0;
+ int ret;
+
+ /* Reset ISI */
+ ret = atmel_isi_wait_status(isi, WAIT_ISI_RESET);
+ if (ret < 0) {
+ dev_err(icd->parent, "Reset ISI timed out\n");
+ return ret;
+ }
+ /* Disable all interrupts */
+ isi_writel(isi, ISI_INTDIS, ~0UL);
spin_lock_irq(&isi->lock);
/* Clear any pending interrupt */