mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Teresa Gámez" <t.gamez@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/5] video imx-ipu-fb: add num_modes to imx3 boards
Date: Thu, 19 Jan 2012 09:23:13 +0100	[thread overview]
Message-ID: <1326961396-19782-2-git-send-email-t.gamez@phytec.de> (raw)
In-Reply-To: <1326961396-19782-1-git-send-email-t.gamez@phytec.de>

Added num_modes to all imx_ipu_fb_platform_data structs.
Removed defines for pcm043 to choose display.
We may switch this during runtime now.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |    1 +
 arch/arm/boards/freescale-mx35-3-stack/3stack.c   |    1 +
 arch/arm/boards/guf-cupid/board.c                 |    1 +
 arch/arm/boards/pcm043/pcm043.c                   |   74 ++++++++++----------
 arch/arm/mach-imx/Kconfig                         |   10 ---
 5 files changed, 40 insertions(+), 47 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index d167ab9..249aaee 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -91,6 +91,7 @@ static void eukrea_cpuimx35_enable_display(int enable)
 
 static struct imx_ipu_fb_platform_data ipu_fb_data = {
 	.mode		= &imxfb_mode,
+	.num_modes	= 1,
 	.bpp		= 16,
 	.enable		= eukrea_cpuimx35_enable_display,
 };
diff --git a/arch/arm/boards/freescale-mx35-3-stack/3stack.c b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
index 030a1a7..fe17899 100644
--- a/arch/arm/boards/freescale-mx35-3-stack/3stack.c
+++ b/arch/arm/boards/freescale-mx35-3-stack/3stack.c
@@ -100,6 +100,7 @@ static struct fb_videomode CTP_CLAA070LC0ACW = {
 
 static struct imx_ipu_fb_platform_data ipu_fb_data = {
 	.mode		= &CTP_CLAA070LC0ACW,
+	.num_modes	= 1,
 	.bpp		= 16,
 };
 
diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c
index 158adfc..94692e7 100644
--- a/arch/arm/boards/guf-cupid/board.c
+++ b/arch/arm/boards/guf-cupid/board.c
@@ -92,6 +92,7 @@ static void cupid_fb_enable(int enable)
 
 static struct imx_ipu_fb_platform_data ipu_fb_data = {
 	.mode		= &guf_cupid_fb_mode,
+	.num_modes	= 1,
 	.bpp		= 16,
 	.enable		= cupid_fb_enable,
 };
diff --git a/arch/arm/boards/pcm043/pcm043.c b/arch/arm/boards/pcm043/pcm043.c
index 23580c9..cd1721c 100644
--- a/arch/arm/boards/pcm043/pcm043.c
+++ b/arch/arm/boards/pcm043/pcm043.c
@@ -56,46 +56,46 @@ struct imx_nand_platform_data nand_info = {
 	.flash_bbt = 1,
 };
 
-#ifdef CONFIG_PCM043_DISPLAY_SHARP
-static struct fb_videomode pcm043_fb_mode = {
-	/* 240x320 @ 60 Hz */
-	.name		= "Sharp-LQ035Q7",
-	.refresh	= 60,
-	.xres		= 240,
-	.yres		= 320,
-	.pixclock	= 185925,
-	.left_margin	= 9,
-	.right_margin	= 16,
-	.upper_margin	= 7,
-	.lower_margin	= 9,
-	.hsync_len	= 1,
-	.vsync_len	= 1,
-	.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE | FB_SYNC_CLK_INVERT | FB_SYNC_CLK_IDLE_EN,
-	.vmode		= FB_VMODE_NONINTERLACED,
-	.flag		= 0,
-};
-#else
-static struct fb_videomode pcm043_fb_mode = {
-	/* 240x320 @ 60 Hz */
-	.name		= "TX090",
-	.refresh	= 60,
-	.xres		= 240,
-	.yres		= 320,
-	.pixclock	= 38255,
-	.left_margin	= 144,
-	.right_margin	= 0,
-	.upper_margin	= 7,
-	.lower_margin	= 40,
-	.hsync_len	= 96,
-	.vsync_len	= 1,
-	.sync		= FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
-	.vmode		= FB_VMODE_NONINTERLACED,
-	.flag		= 0,
+static struct fb_videomode pcm043_fb_mode[] = {
+	{
+		/* 240x320 @ 60 Hz */
+		.name		= "TX090",
+		.refresh	= 60,
+		.xres		= 240,
+		.yres		= 320,
+		.pixclock	= 38255,
+		.left_margin	= 144,
+		.right_margin	= 0,
+		.upper_margin	= 7,
+		.lower_margin	= 40,
+		.hsync_len	= 96,
+		.vsync_len	= 1,
+		.sync		= FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH,
+		.vmode		= FB_VMODE_NONINTERLACED,
+		.flag		= 0,
+	}, {
+		/* 240x320 @ 60 Hz */
+		.name		= "Sharp-LQ035Q7",
+		.refresh	= 60,
+		.xres		= 240,
+		.yres		= 320,
+		.pixclock	= 185925,
+		.left_margin	= 9,
+		.right_margin	= 16,
+		.upper_margin	= 7,
+		.lower_margin	= 9,
+		.hsync_len	= 1,
+		.vsync_len	= 1,
+		.sync		= FB_SYNC_HOR_HIGH_ACT | FB_SYNC_SHARP_MODE | \
+				 FB_SYNC_CLK_INVERT | FB_SYNC_CLK_IDLE_EN,
+		.vmode		= FB_VMODE_NONINTERLACED,
+		.flag		= 0,
+	}
 };
-#endif
 
 static struct imx_ipu_fb_platform_data ipu_fb_data = {
-	.mode		= &pcm043_fb_mode,
+	.mode		= pcm043_fb_mode,
+	.num_modes	= ARRAY_SIZE(pcm043_fb_mode),
 	.bpp		= 16,
 };
 
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 7da39cb..a4b603b 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -405,16 +405,6 @@ endif
 
 menu "Board specific settings       "
 
-if MACH_PCM043
-choice
-	prompt "Display type"
-config PCM043_DISPLAY_SHARP
-	bool "Sharp LQ035Q7"
-config PCM043_DISPLAY_TY090
-	bool "TX090"
-endchoice
-endif
-
 if MACH_PCM037
 choice
 	prompt "SDRAM Bank0"
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-01-19  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19  8:23 [PATCH 1/5] imx-ipu-fb: Add support for multiple video modes Teresa Gámez
2012-01-19  8:23 ` Teresa Gámez [this message]
2012-01-19  8:23 ` [PATCH 3/5] imx-ipu-fb: Fix offset for IPU Clock Teresa Gámez
2012-01-19  8:23 ` [PATCH 4/5] imx-ipu-fb: Add overlay support Teresa Gámez
2012-01-19  8:23 ` [PATCH 5/5] ARM pcm043: " Teresa Gámez
2012-01-23  8:40 ` [PATCH 1/5] imx-ipu-fb: Add support for multiple video modes Sascha Hauer

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=1326961396-19782-2-git-send-email-t.gamez@phytec.de \
    --to=t.gamez@phytec.de \
    --cc=barebox@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