From patchwork Tue Aug 28 10:07:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1380501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 559F03FC71 for ; Tue, 28 Aug 2012 10:11:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T6Iii-0003Th-Lf; Tue, 28 Aug 2012 10:08:28 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T6Iid-0003SL-RK for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2012 10:08:25 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9G00I7FMSGXVA0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2012 19:07:39 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-cf-503c986be63a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id C1.24.17335.B689C305; Tue, 28 Aug 2012 19:07:39 +0900 (KST) Received: from amdc1227.localnet ([106.116.147.199]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9G007S4MSLVP40@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2012 19:07:39 +0900 (KST) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] ARM: EXYNOS: Add support for FIMC cam port B GPIO setup on Exynos4x12 Date: Tue, 28 Aug 2012 12:07:32 +0200 Message-id: <2273077.MFzyvUNijr@amdc1227> Organization: Samsung Poland R&D Center User-Agent: KMail/4.9 (Linux/3.5.2-gentoo; KDE/4.9.0; x86_64; ; ) In-reply-to: <4648723.rWnut7F0uJ@amdc1227> References: <4648723.rWnut7F0uJ@amdc1227> MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOLMWRmVeSWpSXmKPExsVy+t9jQd3sGTYBBnMbVS02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAldG39t7TAWvuCrm/TnH0sB4kaOLkZNDQsBE4viTWYwQtpjEhXvr 2boYuTiEBKYzSrTsvMAI4axlkvizey4bSBWbgJrE54ZHYLaIgIbElK7H7CBFzAJ/GSW+7n/K ApIQFoiROP5zGTOIzSKgKjG5cwFYA6+ApsSt2cfA1vELqEu82/aUCcQWFXCU+DoJwuYU0JLY PWEhK4gtBFR/sKGNEaJXUOLH5Htg85kF5CX27Z/KCmFrSazfeZxpAqPgLCRls5CUzUJStoCR eRWjaGpBckFxUnquoV5xYm5xaV66XnJ+7iZGcHA+k9rBuLLB4hCjAAejEg9vwC7rACHWxLLi ytxDjBIczEoivKuqbAKEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8/L3GQYICaQnlqRmp6YWpBbB ZJk4OKUaGJ2PvK9ecqDHn8HjgdXet22NazNXn/7ssdFcWG+Gz0PlheqCoUVzH50119mjfZ/9 IK/c/pszzHrTnEpSvxrEvT199LnX+5pHv+S2bg6olF6mHNPwQOrInbUr3N5esJX9W1ZpuGDu cjfu17+muU6K1At78Ec87tizueWfV3L9jT5++kHRvguKG94psRRnJBpqMRcVJwIAt+32NkoC AAA= X-Spam-Note: CRM114 invocation failed X-Spam-Score: -7.1 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Kukjin Kim , Linus Walleij , Grant Likely , Kyungmin Park , linux-samsung-soc@vger.kernel.org, Marek Szyprowski 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Exynos4x12 SoCs use different GPIO pins for FIMC cam port B and this patch modifies the setup code to take it into account. Signed-off-by: Tomasz Figa --- arch/arm/mach-exynos/setup-fimc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-exynos/setup-fimc.c b/arch/arm/mach-exynos/setup-fimc.c index d74843e..4b0cce5 100644 --- a/arch/arm/mach-exynos/setup-fimc.c +++ b/arch/arm/mach-exynos/setup-fimc.c @@ -11,6 +11,7 @@ #include #include #include +#include int exynos4_fimc_setup_gpio(enum s5p_camport_id id) { @@ -26,6 +27,22 @@ int exynos4_fimc_setup_gpio(enum s5p_camport_id id) break; case S5P_CAMPORT_B: + if (soc_is_exynos4212() || soc_is_exynos4412()) { + sfn = S3C_GPIO_SFN(3); + + /* PCLK, DATA[0-6] */ + ret = s3c_gpio_cfgrange_nopull(EXYNOS4X12_GPM0(0), 8, sfn); + /* FIELD, DATA[7]*/ + if (!ret) + ret = s3c_gpio_cfgrange_nopull(EXYNOS4X12_GPM1(0), + 2, sfn); + /* VSYNC, HREF, CLKOUT*/ + if (!ret) + ret = s3c_gpio_cfgrange_nopull(EXYNOS4X12_GPM2(0), + 3, sfn); + return ret; + } + gpio8 = EXYNOS4210_GPE0(0); /* DATA[0:7] */ gpio5 = EXYNOS4210_GPE1(0); /* PCLK, VSYNC, HREF, CLKOUT, FIELD */ sfn = S3C_GPIO_SFN(3);