public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] video: ct6900: Add an option to skip video initialization
@ 2009-05-14  5:25 Stefan Roese
  2009-05-14 13:37 ` Wolfgang Denk
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Roese @ 2009-05-14  5:25 UTC (permalink / raw)
  To: u-boot

This patch adds an option to skip the video initialization on the
ct6900. 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.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
---
 drivers/video/ct69000.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/drivers/video/ct69000.c b/drivers/video/ct69000.c
index ae219cc..6a5243b 100644
--- a/drivers/video/ct69000.c
+++ b/drivers/video/ct69000.c
@@ -964,6 +964,16 @@ static struct pci_device_id supported[] = {
 	{}
 };
 
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the video initialization.
+ */
+int __board_video_skip(void)
+{
+	return 0;
+}
+int board_video_skip(void) __attribute__((weak, alias("__board_video_skip")));
+
 /*******************************************************************************
 *
 * Init video chip
@@ -982,8 +992,12 @@ video_hw_init (void)
 	struct ctfb_res_modes *res_mode;
 	struct ctfb_res_modes var_mode;
 	struct ctfb_chips_properties *chips_param;
-	/* Search for video chip */
 
+	/* Check if video initialization should be skipped */
+	if (board_video_skip())
+		return NULL;
+
+	/* Search for video chip */
 	if ((devbusfn = pci_find_devices (supported, 0)) < 0) {
 #ifdef CONFIG_VIDEO_ONBOARD
 		printf ("Video: Controller not found !\n");
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-05-15  6:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14  5:25 [U-Boot] [PATCH] video: ct6900: Add an option to skip video initialization Stefan Roese
2009-05-14 13:37 ` Wolfgang Denk
2009-05-14 13:53   ` Stefan Roese
2009-05-14 14:02     ` Wolfgang Denk
2009-05-14 14:13       ` Stefan Roese
2009-05-14 15:01         ` Wolfgang Denk
2009-05-14 15:17           ` Stefan Roese
2009-05-15  0:44             ` Anatolij Gustschin
2009-05-15  5:36               ` Wolfgang Denk
2009-05-15  6:24                 ` Stefan Roese
2009-05-15  0:36           ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox