[PATCH 2/5] video imx-ipu-fb: add num_modes to imx3 boards

Teresa Gámez t.gamez at phytec.de
Thu Jan 19 03:23:13 EST 2012


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 at 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




More information about the barebox mailing list