[U-Boot] [PATCH] Reset i2c slave devices during init on mpc5xxx cpus

Heiko Schocher hs at denx.de
Thu Sep 3 07:17:51 CEST 2009


Hello Eric,

after applying your patch I got the following warning:

$ ./MAKEALL galaxy5200
Configuring for galaxy5200 board...
i2c.c:223: warning: function declaration isn't a prototype
   text    data     bss     dec     hex filename
 239760   12928  283136  535824   82d10 ./u-boot
$

please fix, thanks.

Eric Millbrandt wrote:
> Reset any i2c devices that may have been interrupted during a system reset.
> Normally this would be accomplished by clocking the line until SCL and SDA
> are released and then sending a start condtiion (From an Atmel datasheet).
> There is no direct access to the i2c pins so instead create start commands
> through the i2c interface.  Send a start command then delay for the SDA Hold
> time, repeat this by disabling/enabling the bus a total of 9 times.
> 
> Signed-off-by: Eric Millbrandt <emillbrandt at dekaresearch.com>
> ---
> 
> Heiko,
> 
> I was able to implement a i2c reset function with features common to all
> mpc5xxx cpu.  Nothing was left from the first implementation, so I am
> submitting this as a new patch.

Thanks!

[..]
> + * time, repeat this by disabling/enabling the bus a total of 9 times.
> + */
> +static void send_reset()

should be
static void send_reset(void)

> +{
> +	struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list