[U-Boot] [PATCH] 2/12 Multiadapter/multibus I2C, common part 2

Wolfgang Denk wd at denx.de
Mon Feb 16 22:41:43 CET 2009


Dear ksi at koi8.net,

In message <Pine.LNX.4.64ksi.0902121412060.21067 at home-gw.koi8.net> you wrote:
> Signed-off-by: Sergey Kubushyn <ksi at koi8.net>
> ---
> diff -purN u-boot-i2c.orig/cpu/mpc8xx/video.c u-boot-i2c/cpu/mpc8xx/video.c
> --- u-boot-i2c.orig/cpu/mpc8xx/video.c	2009-02-12 10:43:41.000000000 -0800
> +++ u-boot-i2c/cpu/mpc8xx/video.c	2009-02-12 10:46:00.000000000 -0800
> @@ -809,7 +809,11 @@ static void video_encoder_init (void)
>  
>  	/* Initialize the I2C */
>  	debug ("[VIDEO ENCODER] Initializing I2C bus...\n");
> +#ifdef CONFIG_NEW_I2C
> +	i2c_init_all();

As mentioned before, I think this is a design problem.

You must not gloablly initialize all I2C busses / adapters.

You are only permitted to initialize those devices that are actually
needed by U-Boot itself to perform certain operations, and you are
supposed to deactivate these after use.

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
How can you tell when sour cream goes bad?


More information about the U-Boot mailing list