[U-Boot] [PATCH] video: ct6900: Add an option to skip video initialization

Wolfgang Denk wd at denx.de
Thu May 14 15:37:15 CEST 2009


Dear Stefan Roese,

In message <1242278732-23803-1-git-send-email-sr at denx.de> you wrote:
> 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.

Hm... why do you change the code of the viseo driver then? This change
should be local to the CPCI750 board only.

> +/*
> + * 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;

This makes no sense  to  me.  Instead  of  adding  a  (basicly  board
specific,  even if you hide it with the weak implementation) shortcut
to video_hw_init() you should not initialize the video driver on this
board at all, leaving the video driver code unchanged.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If the code and  the  comments  disagree,  then  both  are  probably
wrong."                                                - Norm Schryer


More information about the U-Boot mailing list