[U-Boot] [PATCH] Blackfin: TWI/I2C: implement multibus support

Mike Frysinger vapier at gentoo.org
Wed May 5 09:13:39 CEST 2010


On Wednesday 05 May 2010 02:12:18 Heiko Schocher wrote:
> Mike Frysinger wrote:
> > +/* Every register is 32bit aligned, but only 16bits in size */
> > +#define ureg(name) u16 name; u16 __pad_##name;
> > +struct twi_regs {
> > +	ureg(clkdiv);
> > +	ureg(control);
> > +	ureg(slave_ctl);
> > +	ureg(slave_stat);
> > +	ureg(slave_addr);
> > +	ureg(master_ctl);
> > +	ureg(master_stat);
> > +	ureg(master_addr);
> > +	ureg(int_stat);
> > +	ureg(int_mask);
> > +	ureg(fifo_ctl);
> > +	ureg(fifo_stat);
> > +	char __pad[0x50];
> > +	ureg(xmt_data8);
> > +	ureg(xmt_data16);
> > +	ureg(rcv_data8);
> > +	ureg(rcv_data16);
> > +};
> > +#undef ureg
> 
> Your commit message says only "implement multibus support"
> Please add a comment, that you also introduce the "twi_regs"
> struct, thanks.

one doesnt make much sense without the other ...

> bfin_read/write_TWI_* macros uses bfin_read/write16 ... your patch
> don;t longer use this I/O accessors. Is this OK?

in this particular instance, it's fine.  there is an old anomaly on some 
Blackfin parts where bfin_read/bfin_write must always be used as it includes 
appropriate workarounds, but this driver cannot be used on those parts.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100505/717a39a4/attachment.pgp 


More information about the U-Boot mailing list