From patchwork Mon Jul 9 09:17:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 169729 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 F14152C0207 for ; Mon, 9 Jul 2012 19:23:23 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SoA6H-0002Mn-QR; Mon, 09 Jul 2012 09:17:50 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SoA61-0002LC-DG for linux-arm-kernel@lists.infradead.org; Mon, 09 Jul 2012 09:17:36 +0000 Received: by werb13 with SMTP id b13so5894946wer.36 for ; Mon, 09 Jul 2012 02:17:31 -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=Z5dnk2tP83S37OwlfkNNeNYqsQFvbHeQ7L60kWH6MwE=; b=OqhaN9noRhOvtPGWPMbU6pKwfNCp/MVZTOkiazfkYthhPA7E2PlHZFPZZfEcem7QWl rMO6UmavhbWR7LEz5ozd0mqBZsIa4LGXGcwrMjIiCo/p6rVaQTWjZKoN3DLOGULmSUHl z3wOuuBXTPKLT94z4Eb3Ver7PQRsamkYb00UTYrzriBt3kIvWcRXjQcPrhsBWdmyt2Sd 1HMuUd4FSHoZS78RrwrgXoBpnmSXyTy/CK7ezFSf5uQUvoj4ebzV9BbzPlvDwx8YcQaT fHoOklsgC2tLhzadYdTwl9pO4GXOonFcg2KIBidxAnzkgnFqqSrAxs+MXteSn3uh+SE4 akAw== Received: by 10.180.97.106 with SMTP id dz10mr27789609wib.21.1341825451052; Mon, 09 Jul 2012 02:17:31 -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 b7sm8487525wiz.9.2012.07.09.02.17.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jul 2012 02:17:30 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Subject: [PATCH v2 3/3] Visstrim M10: Add support for Coda. Date: Mon, 9 Jul 2012 11:17:17 +0200 Message-Id: <1341825437-23420-2-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341825437-23420-1-git-send-email-javier.martin@vista-silicon.com> References: <1341825437-23420-1-git-send-email-javier.martin@vista-silicon.com> X-Gm-Message-State: ALoCoQkkw91QVRQaJhDlTdZCIJAAwRjnqhho866Kizs8kyadR5rI3hwHZCP2IdtUPYJsAyRF0n66 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 [74.125.82.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. --- Changes since v1: - Use 'arm_memblock_steal'. --- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 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..214e4ff 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c @@ -32,12 +32,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -232,10 +232,8 @@ 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 = arm_memblock_steal(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); } /* GPIOs used as events for applications */ @@ -404,6 +402,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 +482,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)