[U-Boot] [PATCH] 7/12 Multiadapter/multibus I2C, drivers part 4

Heiko Schocher hs at denx.de
Fri Feb 20 08:06:55 CET 2009


Hello ksi,

ksi at koi8.net wrote:
> On Thu, 19 Feb 2009, Heiko Schocher wrote:
>> ksi at koi8.net wrote:
>>> On Wed, 18 Feb 2009, Wolfgang Denk wrote:
>>>> In message <Pine.LNX.4.64ksi.0902181112400.5002 at home-gw.koi8.net> you wrote:
[...]
>>> I'm open to any alternative possibilities but I can not see anything better.
>>> That _EXISTING_ soft_i2c.c we have in the current tree is a little miracle
>>> that was there since the start of times so I can't see any reason to throw
>>> it away and reinvent the wheel.
>> Nobody wants to throw it away!
> 
> You want...

No, we don;t want to throw away soft-i2c.c and make it new. Nobody said
this. We just discus your multibus support for it.

>>>>> The former does not require additional adapter struct member, hwadap_no.
>>>>> And, unlike the latter, it is self-contained, it doesn't require any
>>>>> external global variable to decide what to do. One can initialize all
>>>>> adapters by:
>>>>>
>>>>> 	for (i = 0; i < NUM_I2C_ADAPTERS; i++)
>>>>> 		i2c_adap[i]->init(...);
>>>> Most probably we never *want* to initialize all adapters...
>>> It is easier that way and wouldn't do any harm in most cases...
>> But it is not needed when doing this in i2c_set_bus_num() !!
>> It is sufficent to init a hardwareadapter, when switching to it.
> 
> That means you'll have to rewrite the entire U-Boot. 99% of the boards have
> only one bus so they did not switch busses. That means they never called
> that i2c_set_bus_num() relying on i2c_init() in libxxx/board.c instead.

But we can call i2c_set_bus_num instead of i2c_init() right?

> Sorry guys, I do not have THAT much free time that my employer would let me
> to spend on this.

Hey, this is "my" free time. I don;t get money for this discussion.

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