From patchwork Fri May 21 07:19:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 101306 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4L7Jkl1010890 for ; Fri, 21 May 2010 07:19:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753591Ab0EUHTn (ORCPT ); Fri, 21 May 2010 03:19:43 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:38513 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062Ab0EUHTm (ORCPT ); Fri, 21 May 2010 03:19:42 -0400 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.71) (envelope-from ) id 1OFMW6-00065u-7d; Fri, 21 May 2010 09:19:34 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1OFMW6-000326-5q; Fri, 21 May 2010 09:19:34 +0200 Date: Fri, 21 May 2010 09:19:34 +0200 From: Sascha Hauer To: Baruch Siach Cc: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sascha Hauer Subject: Re: [PATCH 1/3] mx2_camera: Add soc_camera support for i.MX25/i.MX27 Message-ID: <20100521071934.GC17272@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:18:03 up 25 days, 44 min, 25 users, load average: 3.41, 3.35, 2.88 User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 21 May 2010 07:19:46 +0000 (UTC) diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 5d6fb08..6436968 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -216,6 +216,7 @@ struct mx2_camera_dev { unsigned int irq_csi, irq_emma; void __iomem *base_csi, *base_emma; + unsigned long base_dma; struct mx2_camera_platform_data *pdata; struct resource *res_csi, *res_emma; @@ -550,7 +551,7 @@ static void mx2_videobuf_queue(struct videobuf_queue *vq, if (!pcdev->active) { ret = imx_dma_setup_single(pcdev->dma, videobuf_to_dma_contig(vb), vb->size, - (u32)pcdev->base_csi + 0x10, + (u32)pcdev->base_dma + 0x10, DMA_MODE_READ); if (ret) { vb->state = VIDEOBUF_ERROR; @@ -976,7 +977,8 @@ static void mx27_camera_frame_done(struct mx2_camera_dev *pcdev, int state) vb->state = VIDEOBUF_ACTIVE; ret = imx_dma_setup_single(pcdev->dma, videobuf_to_dma_contig(vb), - vb->size, (u32)pcdev->base_csi + 0x10, DMA_MODE_READ); + vb->size, (u32)pcdev->base_dma + 0x10, DMA_MODE_READ); + if (ret) { vb->state = VIDEOBUF_ERROR; wake_up(&vb->done); @@ -1273,6 +1275,7 @@ static int mx2_camera_probe(struct platform_device *pdev) } pcdev->irq_csi = irq_csi; pcdev->base_csi = base_csi; + pcdev->base_dma = res_csi->start; pcdev->dev = &pdev->dev; err = request_irq(pcdev->irq_csi, mx2_cam_irq_handler, 0,