summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2013-08-03 07:22:53 +0200
committerAnatolij Gustschin <agust@denx.de>2013-08-10 10:57:44 +0200
commit2bc4aa522740a1b72bb814d0ddf1f9be7df82c83 (patch)
treebbf79d2c1591a8a728cddf17c3d1e06641209c65
parent3d192be9ad07ef13898c0e79ce29c3d70b253d67 (diff)
downloadu-boot-imx-2bc4aa522740a1b72bb814d0ddf1f9be7df82c83.zip
u-boot-imx-2bc4aa522740a1b72bb814d0ddf1f9be7df82c83.tar.gz
u-boot-imx-2bc4aa522740a1b72bb814d0ddf1f9be7df82c83.tar.bz2
video: add an option to skip cfb console init
This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [agust: use '__weak int board_cfb_skip(void)'] Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r--drivers/video/cfb_console.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index c09b7e3..68ba38b 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -431,6 +431,16 @@ static const int video_font_draw_table32[16][4] = {
{0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff}
};
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the cfb initialization.
+ */
+__weak int board_cfb_skip(void)
+{
+ /* As default, don't skip cfb init */
+ return 0;
+}
+
static void video_drawchars(int xx, int yy, unsigned char *s, int count)
{
u8 *cdat, *dest, *dest0;
@@ -2017,6 +2027,8 @@ static void *video_logo(void)
return video_fb_address + video_logo_height * VIDEO_LINE_LEN;
}
#endif
+ if (board_cfb_skip())
+ return 0;
sprintf(info, " %s", version_string);
@@ -2226,6 +2238,9 @@ int drv_video_init(void)
/* Init video chip - returns with framebuffer cleared */
skip_dev_init = (video_init() == -1);
+ if (board_cfb_skip())
+ return 0;
+
#if !defined(CONFIG_VGA_AS_SINGLE_DEVICE)
debug("KBD: Keyboard init ...\n");
skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1);