summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYauhen Kharuzhy <y.kharuzhy@sam-solutions.net>2013-01-30 15:55:12 +0300
committerJustin Waters <justin.waters@timesys.com>2013-11-07 12:19:22 -0500
commitd3a69896fc07d8a93b6a41a398b179fa0eca8508 (patch)
treeca893eb1c8c63d8562d01eb53b74c46c3eb89b9d /drivers
parente6bf626df88436beb7c2e8ceff7578997dd1f3e7 (diff)
mxc_camera: Select right IPU IRQ for channels other than CSI0
Signed-off-by: Yauhen Kharuzhy <y.kharuzhy@sam-solutions.net> Signed-off-by: Christian Hemp <c.hemp@phytec.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mxc_ipu_csi_enc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/mxc_ipu_csi_enc.c b/drivers/media/video/mxc_ipu_csi_enc.c
index 1fd8f46a9b71..e784d1c7a021 100644
--- a/drivers/media/video/mxc_ipu_csi_enc.c
+++ b/drivers/media/video/mxc_ipu_csi_enc.c
@@ -193,6 +193,7 @@ static int csi_enc_enabling_tasks(struct mxc_camera_dev *cam)
{
int err = 0;
struct csi_enc_data *enc_data = mxc_cam_to_enc_data(cam);
+ uint32_t irq;
CAMERA_TRACE("IPU:In csi_enc_enabling_tasks\n");
@@ -210,8 +211,10 @@ static int csi_enc_enabling_tasks(struct mxc_camera_dev *cam)
PAGE_ALIGN(cam->icd->sizeimage);
enc_data->dummy_frame.buffer.m.offset = enc_data->dummy_frame.paddress;
- ipu_clear_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF);
- err = ipu_request_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF,
+ irq = IPU_IRQ_CSI0_OUT_EOF + cam->csi;
+
+ ipu_clear_irq(cam->ipu, irq);
+ err = ipu_request_irq(cam->ipu, irq,
csi_enc_callback, 0, "Mxc Camera", cam);
if (err != 0) {
printk(KERN_ERR "Error registering rot irq\n");
@@ -238,7 +241,7 @@ static int csi_enc_disabling_tasks(struct mxc_camera_dev *cam)
int err = 0;
struct csi_enc_data *enc_data = mxc_cam_to_enc_data(cam);
- ipu_free_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF, cam);
+ ipu_free_irq(cam->ipu, IPU_IRQ_CSI0_OUT_EOF + cam->csi, cam);
err = ipu_disable_channel(cam->ipu, get_csi_mem_dma_channel(cam->csi), true);