[U-Boot] [PATCH] i2c: designware: Convert driver to multibus/multiadapter framework

Stefan Roese sr at denx.de
Fri Oct 24 07:57:19 CEST 2014


Hi Alexey,

On 23.10.2014 19:25, Alexey Brodkin wrote:
> On Thu, 2014-10-23 at 13:06 +0200, Stefan Roese wrote:
>> In preparation for the SoCFPGA support of the designware I2C driver,
>> convert this driver to the common CONFIG_SYS_I2C framework.
>>
>> This patch converts all users of this driver, this is:
>>
>> - ST spearxxx boards
>> - AXS101 (ARC700 platform)
>>
>> I couldn't test this patch on those boards. Only compile tested for all
>> spear boards. And tested on SoCFPGA.
>>
>> Signed-off-by: Stefan Roese <sr at denx.de>
>> Cc: Heiko Schocher <hs at denx.de>
>> Cc: Marek Vasut <marex at denx.de>
>> Cc: Vipin Kumar <vipin.kumar at st.com>
>> Cc: Alexey Brodkin <abrodkin at synopsys.com>
>> ---
>>   arch/arm/cpu/arm926ejs/spear/cpu.c |   2 +-
>>   drivers/i2c/Makefile               |   2 +-
>>   drivers/i2c/designware_i2c.c       | 294 ++++++++++++++++---------------------
>>   include/configs/axs101.h           |   9 +-
>>   include/configs/spear-common.h     |   4 +-
>>   include/configs/x600.h             |   4 +-
>>   6 files changed, 142 insertions(+), 173 deletions(-)
>
>> -static struct i2c_regs *i2c_regs_p =
>> -    (struct i2c_regs *)CONFIG_SYS_I2C_BASE;
>> +	default:
>> +		printf("wrong hwadapnr: %d\n", adap->hwadapnr);
>> +	}
>
> Well, I'd say "wrong hwadapnr" is not very informative.
> Maybe something more human-friendly?

Yes, now that you mention it, this really is ugly. Copy-n-pasted from 
some other driver. I'll change it in the next version.

Thanks,
Stefan



More information about the U-Boot mailing list