[U-Boot] [RFC] i2c, ppc4xx_i2c: switch to new multibus/multiadapter support

Heiko Schocher hs at denx.de
Wed Apr 24 14:48:09 CEST 2013


Hello Dirk,

On 24.04.2013 13:43, Dirk Eibach wrote:
> Signed-off-by: Dirk Eibach <dirk.eibach at gdsys.cc>
> Cc: Heiko Schocher <hs at denx.de>
> Cc: Stefan Roese <sr at denx.de>
> ---
>  drivers/i2c/Makefile     |    2 +-
>  drivers/i2c/ppc4xx_i2c.c |  193 +++++++++++++++++++++++-----------------------
>  2 files changed, 97 insertions(+), 98 deletions(-)

Did you tried this patch with the mutlibus/multiadapter
framework?

When switching one i2c driver to this new Framework, you
must adapt all config files, which use this driver ...
Sorry, some stupid work, but it must be done, without
this I will bet, MAKEALL fails ...

[...]
> diff --git a/drivers/i2c/ppc4xx_i2c.c b/drivers/i2c/ppc4xx_i2c.c
> index 53fedd5..c924874 100644
> --- a/drivers/i2c/ppc4xx_i2c.c
> +++ b/drivers/i2c/ppc4xx_i2c.c
[...]
> +#ifdef CONFIG_SYS_I2C_PPC4XX_CH0

You introduce here new defines, please document them in
the README, thanks!

> +U_BOOT_I2C_ADAP_COMPLETE(ppc4xx_0, ppc4xx_i2c_init, ppc4xx_i2c_probe,
> +			 ppc4xx_i2c_read, ppc4xx_i2c_write,
> +			 ppc4xx_i2c_set_bus_speed,
> +			 CONFIG_SYS_I2C_PPC4XX_SPEED_0,
> +			 CONFIG_SYS_I2C_PPC4XX_SLAVE_0, 0)
> +#endif
> +#ifdef CONFIG_SYS_I2C_PPC4XX_CH1
> +U_BOOT_I2C_ADAP_COMPLETE(ppc4xx_1, ppc4xx_i2c_init, ppc4xx_i2c_probe,
> +			 ppc4xx_i2c_read, ppc4xx_i2c_write,
> +			 ppc4xx_i2c_set_bus_speed,
> +			 CONFIG_SYS_I2C_PPC4XX_SPEED_1,
> +			 CONFIG_SYS_I2C_PPC4XX_SLAVE_1, 1)
> +#endif

beside of this, your patch looks good ...

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