From patchwork Wed Oct 10 03:29:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1572091 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 676BDDF24C for ; Wed, 10 Oct 2012 03:31:37 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TLmzb-0001h9-I3; Wed, 10 Oct 2012 03:29:55 +0000 Received: from mail-yh0-f49.google.com ([209.85.213.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TLmzN-0001en-TD for linux-arm-kernel@lists.infradead.org; Wed, 10 Oct 2012 03:29:43 +0000 Received: by mail-yh0-f49.google.com with SMTP id j52so16140yhj.36 for ; Tue, 09 Oct 2012 20:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=C4eG9baziB1zmkmexkozeFubx/2JBaZXYEmmZReRHcw=; b=oBqQqHtMH87VHueCtWWQ5xJ/iOHojwKkr5rsz27BELv2VnFNRZbcJj6ohs+m7z5UE0 RAgcIwd6diuqWFwCFI2N47Sf8ogsIhN9tRENe5/FQA2lymc6C1l0vv4iHguZjfLjmnz7 XD9aWqd28sS4NepZIE6fxYq4GqXApP3TCzSo0Tkv+veU3sgIldJ6p7QFRhX/9LMHjdjf K1bHydmhFhakIF+ixGdv0XiyXcQXLgkMVSR7FPYX7gUGgTb2KCqH7a9nPSIDBFgfRMPG mLWkb3Z8cQFqfSvwFDKTCXj1m4fYmfufbbdxX6+fY2MnXHUOsIWlOQPLKQ+qeNw3aIFz faqw== Received: by 10.236.124.231 with SMTP id x67mr21715674yhh.41.1349839780573; Tue, 09 Oct 2012 20:29:40 -0700 (PDT) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([201.82.136.72]) by mx.google.com with ESMTPS id m13sm143029ank.16.2012.10.09.20.29.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 20:29:40 -0700 (PDT) From: Fabio Estevam To: kernel@pengutronix.de Subject: [PATCH 2/2] ARM: mx27_3ds: Add VPU support Date: Wed, 10 Oct 2012 00:29:30 -0300 Message-Id: <1349839770-13848-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349839770-13848-1-git-send-email-festevam@gmail.com> References: <1349839770-13848-1-git-send-email-festevam@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.49 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Fabio Estevam mx27 has a VPU (Video Processing Unit) block that allows doing H264/MPEG4 decoding and encoding in hardware. Add support for it. Signed-off-by: Fabio Estevam --- arch/arm/mach-imx/mach-mx27_3ds.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index d3b9a60..3ef8548 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c @@ -500,6 +500,21 @@ static void __init mx27pdk_init_camera(void) return; } +static void __init mx27pdk_init_vpu(void) +{ + struct platform_device *pdev; + int dma; + + pdev = imx27_add_coda(); + dma = dma_declare_coherent_memory(&pdev->dev, + mx2_camera_base + MX27PDK_CAM_BUF_SIZE, + mx2_camera_base + MX27PDK_CAM_BUF_SIZE, + MX27PDK_CAM_BUF_SIZE, + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); + if (!(dma & DMA_MEMORY_MAP)) + return; +} + static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { .bitrate = 100000, }; @@ -553,6 +568,7 @@ static void __init mx27pdk_init(void) imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); + mx27pdk_init_vpu(); } static void __init mx27pdk_timer_init(void) @@ -567,7 +583,7 @@ static struct sys_timer mx27pdk_timer = { static void __init mx27pdk_reserve(void) { /* reserve MX27_3DS_CAMERA_BUF_SIZE bytes for mx2-camera */ - mx2_camera_base = arm_memblock_steal(MX27PDK_CAM_BUF_SIZE, + mx2_camera_base = arm_memblock_steal(3 * MX27PDK_CAM_BUF_SIZE, MX27PDK_CAM_BUF_SIZE); }