public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: t.figa@samsung.com (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	[thread overview]
Message-ID: <2273077.MFzyvUNijr@amdc1227> (raw)
In-Reply-To: <4648723.rWnut7F0uJ@amdc1227>

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 <t.figa@samsung.com>
---
 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 <linux/gpio.h>
 #include <plat/gpio-cfg.h>
 #include <plat/camport.h>
+#include <plat/cpu.h>
 
 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);
-- 
1.7.12

  parent reply	other threads:[~2012-08-28 10:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 10:01 [PATCH 0/3] ARM: EXYNOS: Add support for GPIO on Exynos4x12 Tomasz Figa
2012-08-28 10:06 ` [PATCH 1/3] ARM: EXYNOS: Use EXYNOS4210_GPEx instead of EXYNOS4_GPEx Tomasz Figa
2012-08-28 14:48   ` Thomas Abraham
2012-08-28 23:44   ` Kukjin Kim
2012-08-29  0:03     ` Kyungmin Park
2012-08-29 13:52       ` Tomasz Figa
2012-08-28 10:06 ` [PATCH 2/3] gpio: samsung: Add support for Exynos4x12 SoCs Tomasz Figa
2012-08-28 14:55   ` Thomas Abraham
2012-08-28 17:27     ` Tomasz Figa
2012-08-28 10:07 ` Tomasz Figa [this message]
2012-08-28 14:58 ` [PATCH 0/3] ARM: EXYNOS: Add support for GPIO on Exynos4x12 Thomas Abraham
2012-08-31 22:46   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2273077.MFzyvUNijr@amdc1227 \
    --to=t.figa@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox