[U-Boot] [PATCH 22/29] cpu/mpc512x/i2c.c: use immr offsets from C struct instead of #define

Heiko Schocher hs at denx.de
Sun May 10 18:28:52 CEST 2009


Hello Wolfgang,

Wolfgang Denk wrote:
> In message <4A069233.2080101 at denx.de> you wrote:
>>> -#define immr ((immap_t *)CONFIG_SYS_IMMR)
>>> -
>>>  /* by default set I2C bus 0 active */
>>>  static unsigned int bus_num = 0;
>> If no other bus then the first needed, when running from Flash,
>> its okay for me.
> 
> Actually no I2C is needed while running from flash. In most cases,
> I2C will not be touched at all in U-Boot (i. e. only when a user runs
> a I2C command).

so it is fully ok for me.

>>> @@ -222,9 +226,9 @@ void i2c_init (int speed, int saddr)
>>>  	}
>>>  
>>>  	/* Disable interrupts */
>>> -	immr->i2c.icr = 0;
>>> +	im->i2c.icr = 0;
>> shouldn;t we use in/out accessors for this?
>>
>>>  	/* Turn off filters */
>>> -	immr->i2c.mifr = 0;
>>> +	im->i2c.mifr = 0;
>> here too (and so on) ...
> 
> Yes - as you saw later, I decided to do this in a separate commit.

Yep.

> Would you prefer if I squashed these commits into one? I can do that,
> of course. But I found debugging easier as is now...

No it is fine for me, I just sequentially read the EMails, so I saw
the patch, which uses the in/out accessors later ;-)

Hmm... I think the complete patchseries go through the mpc5xxx custodian,
so I only have to ACK this patches, right?

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