[U-Boot] [PATCH RESEND 7/9] video: Allow board hook before video init

Maxime Ripard maxime.ripard at free-electrons.com
Tue Nov 8 11:19:27 CET 2016


Some boards might need to some additional setup right before initialising
the video console.

Add some hook to allow that.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 drivers/video/cfb_console.c |  9 +++++++++
 1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index c0b1b8dc17e2..724ae16c5a9b 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -2119,6 +2119,11 @@ __weak int board_video_skip(void)
 	return 0;
 }
 
+__weak int board_video_pre_init(void)
+{
+	return 0;
+}
+
 int drv_video_init(void)
 {
 	struct stdio_dev console_dev;
@@ -2129,6 +2134,10 @@ int drv_video_init(void)
 	if (board_video_skip())
 		return 0;
 
+	/* Allow the board to setup a few things */
+	if (board_video_pre_init())
+		return 0;
+
 	/* Init video chip - returns with framebuffer cleared */
 	if (cfg_video_init() == -1)
 		return 0;
-- 
git-series 0.8.11


More information about the U-Boot mailing list