[U-Boot] [PATCH v3 6/9] i2c, davinci: add support for multiple i2c buses

Heiko Schocher hs at denx.de
Mon Mar 24 06:21:33 CET 2014


Hello Murali,

Am 21.03.2014 21:51, schrieb Murali Karicheri:
> From: Vitaly Andrianov<vitalya at ti.com>
>
> Signed-off-by: Vitaly Andrianov<vitalya at ti.com>
> Signed-off-by: Murali Karicheri<m-karicheri2 at ti.com>
> ---
>   drivers/i2c/davinci_i2c.c |  343 +++++++++++++++++++++++++++------------------
>   drivers/i2c/davinci_i2c.h |   27 ++--
>   2 files changed, 218 insertions(+), 152 deletions(-)
>
> diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
> index 6e5260c..c4a6c4d 100644
> --- a/drivers/i2c/davinci_i2c.c
> +++ b/drivers/i2c/davinci_i2c.c
> @@ -1,8 +1,9 @@
>   /*
>    * TI DaVinci (TMS320DM644x) I2C driver.
>    *
> - * Copyright (C) 2007 Sergey Kubushyn<ksi at koi8.net>
> - *
> + * (C) Copyright 2012-2014
> + *     Texas Instruments Incorporated,<www.ti.com>
> + * (C) Copyright 2007 Sergey Kubushyn<ksi at koi8.net>
>    * --------------------------------------------------------
>    *
>    * SPDX-License-Identifier:	GPL-2.0+
> @@ -12,14 +13,26 @@
>   #include<i2c.h>
>   #include<asm/arch/hardware.h>
>   #include<asm/arch/i2c_defs.h>
> +#include<asm/io.h>
>   #include "davinci_i2c.h"
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +static struct i2c_regs __attribute__((section(".data"))) *i2c_base =
> +						(struct i2c_regs *)I2C_BASE;
> +
> +#ifdef CONFIG_I2C_MULTI_BUS
> +static unsigned int __attribute__((section(".data")))
> +		bus_initialized[I2C_BUS_MAX] = { [0 ... (I2C_BUS_MAX-1)] = 0 };
> +static unsigned int __attribute__((section(".data"))) current_bus;
> +#endif
> +

NACK. Please convert this driver to the new i2c multibus/multiadapter
framework, please use CONFIG_SYS_I2C, thanks!

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