summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-05-15 10:07:43 +0200
committerWolfgang Denk <wd@denx.de>2009-06-12 20:39:51 +0200
commit6cc7ba9ed43106946aa9aa868302aa2faf1d17be (patch)
tree44b4c835917885cfb25cf237d7b45c30d760e611
parentf62f64692ff7f6226ad221d5df6487ea5ef39bdd (diff)
downloadu-boot-imx-6cc7ba9ed43106946aa9aa868302aa2faf1d17be.zip
u-boot-imx-6cc7ba9ed43106946aa9aa868302aa2faf1d17be.tar.gz
u-boot-imx-6cc7ba9ed43106946aa9aa868302aa2faf1d17be.tar.bz2
video: Add an option to skip video initialization
This patch adds an option to skip the video initialization on for all video drivers. This is needed for the CPCI750 which can be built as CPCI host and adapter/target board. And the adapter board can't access the video cards located on the CompactPCI bus. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Rebased against simplifying patch. Signed-off-by: Wolfgang Denk <wd@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 409d4b7..bcafb27 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1330,11 +1330,26 @@ static int video_init (void)
/*****************************************************************************/
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the video initialization.
+ */
+int __board_video_skip(void)
+{
+ /* As default, don't skip test */
+ return 0;
+}
+int board_video_skip(void) __attribute__((weak, alias("__board_video_skip")));
+
int drv_video_init (void)
{
int skip_dev_init;
device_t console_dev;
+ /* Check if video initialization should be skipped */
+ if (board_video_skip())
+ return 0;
+
/* Init video chip - returns with framebuffer cleared */
skip_dev_init = (video_init () == -1);