[U-Boot] [PATCH 1/2] I2C: add Marvell TWSI simple driver
Albert ARIBAUD
albert.aribaud at free.fr
Thu Aug 26 08:33:18 CEST 2010
(adding Heiko, custodian of I2C/EEPROM and committer of kirkwood_i2c)
Le 26/08/2010 06:33, Prafulla Wadaskar a écrit :
>
>
>> -----Original Message-----
>> From: u-boot-bounces at lists.denx.de
>> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert Aribaud
>> Sent: Wednesday, August 25, 2010 7:54 PM
>> To: u-boot at lists.denx.de
>> Subject: [U-Boot] [PATCH 1/2] I2C: add Marvell TWSI simple driver
>>
>> This driver is for the Marvell TWSI/I2C module found in
>> the orion and kirkwood families among others.
>>
>> Signed-off-by: Albert Aribaud<albert.aribaud at free.fr>
>> ---
>> While the 'kirkwood_i2c' driver for the Marvell TWSI module
>> is already available in u-boot, this one is 25% smaller, less
>> complex (no state machine) and much faster (i2c probe on an
>> ED Mini V2 takes no noticeable time vs. half a second).
>
> Hi Albert
> This will be very good enhancement indeed.
>
>>
>> drivers/i2c/Makefile | 1 +
>> drivers/i2c/mvtwsi.c | 419
>
> Can you pls follow the same strategy as we followed for mvgbe, mvsata?
> Please rename and enhance current kirkwood_i2c driver support,
> and then add support for Orion followed by board support for edminiv2
>
> Regards..
> Prafulla ..
I can do this of course; however I felt that I was not fixing an
existing driver (as I did with mvgbe) or adding support (as I did with
mvsata where there was no existing driver) but introducing competition
(as kirkwood_i2c exists and is functional) and I did not want to rudely
stomp the existing driver.
Besides, as mvtwsi is new code, and even though I tested it (probe,
read, write) with the ED Mini V2 EEPROM and RTC, until we are sure that
it works we might want to keep the older kirkwood_i2c code around and be
able to switch from one to the other -- having two different drivers for
the same HW IP and selecting at config time is done in
include/configs/km_arm.h where an option can be set to use either the
soft I2C driver or the kirkwood one.
Finally, we can always remove the kirkwood_i2c driver later on if we
want, in a separate patch (which will also switch km_arm to using mvtwsi).
Anyway, this mvtwsi patch will require Heiko's ACK as well as yours;
let's hear from him (when he is back) on whether I should add mvtwsi or
replace kirkwood_i2c.
Amicalement,
--
Albert.
More information about the U-Boot
mailing list