From patchwork Fri Jul 6 12:57:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 169471 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6C0F82C01D3 for ; Fri, 6 Jul 2012 23:04:04 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sn88C-0004x4-CE; Fri, 06 Jul 2012 12:59:32 +0000 Received: from mail-wi0-f177.google.com ([209.85.212.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sn86u-0004hG-9u for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2012 12:58:15 +0000 Received: by wibhm11 with SMTP id hm11so551315wib.0 for ; Fri, 06 Jul 2012 05:58:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=UDt++yB5bzbb46n7ctxloGJd5Vh8n0J3uawLjnL1qTE=; b=U1qMvRmOCgnqeXYOrBez+mvBjpuvlfxTrn7mdv718Bn1Igwswdfquih7YPGuSkNQUV ieG+ucwuqHtwcl+LexOAl+5OiYyqUtgvXc5InFMINjdM1xxzcpz/YYu29DDODUSrqV74 pHGE6P/Q+KmpISE+n3eS3KqL4epcs5GnRe0zoluvjq4FC2T/bc0oZz/upFy9rfmOcbiy dNM1P6F2P+Iz7MCfm54135uH+5+UvgCnrWAsTIsVuxbKserBxky0fUYleC1e89DZ71nm HshyC+f7XGpgJGBbiUXcuLq/GOH4SXfPVsAN199HcpH0PjN1hOFOwOSVpxUrpYHvWnWZ r5HQ== Received: by 10.180.19.169 with SMTP id g9mr7666154wie.9.1341579490098; Fri, 06 Jul 2012 05:58:10 -0700 (PDT) Received: from piscis.vsilicon.net (96.252.106.212.dynamic.jazztel.es. [212.106.252.96]) by mx.google.com with ESMTPS id t8sm5628147wiy.3.2012.07.06.05.58.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jul 2012 05:58:09 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Subject: [PATCH 3/3] Visstrim M10: Add support for Coda. Date: Fri, 6 Jul 2012 14:57:51 +0200 Message-Id: <1341579471-25208-4-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341579471-25208-1-git-send-email-javier.martin@vista-silicon.com> References: <1341579471-25208-1-git-send-email-javier.martin@vista-silicon.com> X-Gm-Message-State: ALoCoQlcdwj4sRNKLPDwa3MYYHL2DTVJXhU/dtUMGu8SpLOggxN2Md4X+BKFLbpldhPiG20Pv8Kf X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: fabio.estevam@freescale.com, sakari.ailus@maxwell.research.nokia.com, kernel@pengutronix.de, Javier Martin , arnaud.patard@rtp-net.org, mchehab@infradead.org, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com, p.zabel@pengutronix.de, shawn.guo@linaro.org, linux-arm-kernel@lists.infradead.org, richard.zhu@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Support the codadx6 that is included in the i.MX27 SoC. --- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index f76edb9..bee2714 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c @@ -232,10 +232,10 @@ static void __init visstrim_camera_init(void) static void __init visstrim_reserve(void) { /* reserve 4 MiB for mx2-camera */ - mx2_camera_base = memblock_alloc(MX2_CAMERA_BUF_SIZE, + mx2_camera_base = memblock_alloc(2 * MX2_CAMERA_BUF_SIZE, MX2_CAMERA_BUF_SIZE); - memblock_free(mx2_camera_base, MX2_CAMERA_BUF_SIZE); - memblock_remove(mx2_camera_base, MX2_CAMERA_BUF_SIZE); + memblock_free(mx2_camera_base, 2 * MX2_CAMERA_BUF_SIZE); + memblock_remove(mx2_camera_base, 2 * MX2_CAMERA_BUF_SIZE); } /* GPIOs used as events for applications */ @@ -404,6 +404,23 @@ static const struct imx_ssi_platform_data visstrim_m10_ssi_pdata __initconst = { .flags = IMX_SSI_DMA | IMX_SSI_SYN, }; +/* coda */ + +static void __init visstrim_coda_init(void) +{ + struct platform_device *pdev; + int dma; + + pdev = imx27_add_coda(); + dma = dma_declare_coherent_memory(&pdev->dev, + mx2_camera_base + MX2_CAMERA_BUF_SIZE, + mx2_camera_base + MX2_CAMERA_BUF_SIZE, + MX2_CAMERA_BUF_SIZE, + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); + if (!(dma & DMA_MEMORY_MAP)) + return; +} + static void __init visstrim_m10_revision(void) { int exp_version = 0; @@ -467,6 +484,7 @@ static void __init visstrim_m10_board_init(void) &iclink_tvp5150, sizeof(iclink_tvp5150)); gpio_led_register_device(0, &visstrim_m10_led_data); visstrim_camera_init(); + visstrim_coda_init(); } static void __init visstrim_m10_timer_init(void)