[U-Boot] [PATCH 2/2] mx6qsabresd: Add splash screen support via HDMI

Pardeep Kumar Singla b45784 at freescale.com
Sat Jul 13 00:21:23 CEST 2013


Signed-off-by: Pardeep Kumar Singla <b45784 at freescale.com>
---
 board/freescale/mx6sabresd/mx6sabresd.c |   48 +++++++++++++++++++++++++++++++
 include/configs/mx6sabre_common.h       |    2 +-
 include/configs/mx6sabresd.h            |   18 ++++++++++++
 3 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 222ee98..fc00063 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -29,6 +29,11 @@
 #include <fsl_esdhc.h>
 #include <miiphy.h>
 #include <netdev.h>
+#include <asm/arch/crm_regs.h>
+#include <ipu_pixfmt.h>
+#include <linux/fb.h>
+#include <asm/arch/mxc_hdmi.h>
+#include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -131,6 +136,37 @@ static void setup_iomux_uart(void)
 	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
 }
 
+#if defined(CONFIG_VIDEO_IPUV3)
+static struct display_info_t const displays = {
+	.pixfmt = IPU_PIX_FMT_RGB24,
+	.enable = imx_enable_hdmi_phy,
+	.mode   = {
+	.name           = "HDMI",
+	.refresh        = 60,
+	.xres           = 1024,
+	.yres           = 768,
+	.pixclock       = 15385,
+	.left_margin    = 220,
+	.right_margin   = 40,
+	.upper_margin   = 21,
+	.lower_margin   = 7,
+	.hsync_len      = 60,
+	.vsync_len      = 10,
+	.sync           = FB_SYNC_EXT,
+	.vmode          = FB_VMODE_NONINTERLACED
+} };
+
+int board_video_skip(void)
+{
+	int ret;
+	ret = ipuv3_fb_init(&displays.mode, 0, displays.pixfmt);
+	if (ret)
+		printf("HDMI cannot be configured: %d\n", ret);
+	displays.enable(&displays);
+	return ret;
+}
+#endif /* CONFIG_VIDEO_IPUV3 */
+
 #ifdef CONFIG_FSL_ESDHC
 struct fsl_esdhc_cfg usdhc_cfg[3] = {
 	{USDHC2_BASE_ADDR},
@@ -255,10 +291,22 @@ int board_eth_init(bd_t *bis)
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
+#if defined(CONFIG_VIDEO_IPUV3)
+	imx_setup_hdmi();
+#endif
 
 	return 0;
 }
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+	return 1;
+}
+
 int board_init(void)
 {
 	/* address of boot parameters */
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 53cc559..bb1ac8c 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -32,7 +32,7 @@
 #define CONFIG_REVISION_TAG
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
+#define CONFIG_SYS_MALLOC_LEN         (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_BOARD_LATE_INIT
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 76675f4..3d3ec9f 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -25,6 +25,24 @@
 #define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
 #include "mx6sabre_common.h"
+#include<asm/sizes.h>
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN           (10 * SZ_1M)
+
+/* Framebuffer */
+#define CONFIG_VIDEO
+#define CONFIG_VIDEO_IPUV3
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
+#define CONFIG_VIDEO_BMP_RLE8
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_BMP_16BPP
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_IPUV3_CLK 260000000
+#define CONFIG_IMX_HDMI
 
 #define CONFIG_SYS_FSL_USDHC_NUM	3
 #if defined(CONFIG_ENV_IS_IN_MMC)
-- 
1.7.9.5




More information about the U-Boot mailing list