[U-Boot-Users] Using a second I2C interface

Ben Warren bwarren at qstreams.com
Tue May 16 15:50:17 CEST 2006


This sounds like a sensible approach.  This should clean the code up
nicely (as you'll notice, the patch that I submitted yesterday adds
quite a bit of noisy code).  Let's look at what Richard Woodruff
submits, and we can take it from there.

Too bad I didn't get your input until this morning, even though your
message went out on Friday...


On Fri, 2006-05-12 at 21:01 +0200, Wolfgang Denk wrote:

> Hello,
> in message <E541A453-EC07-4597-8D60-2EE3919C1A18 at kernel.crashing.org> you wrote:
> > 
> > > The CPU I'm using (MPC8349) has two hardware I2C interfaces, and  
> > > I'd like to access the second one in U-boot.  Implementing this  
> > > looks easy to me, but I don't want to reinvent the wheel if it's  
> > > already been done elsewhere.  Has anyone done this?  If not, I'll  
> > > follow up with a proposal.
> > 
> > Depending on what you want to do, you can cheat and just change the  
> > pointer to the 2nd interface.  If you want something more full  
> > featured up to the command level then I think some discussion would  
> > be required on how the commands should work for specifying which  
> > controller to use.
> A clean design should allow to switch I2C  busses  usign  a  command;
> additionally,  I think we should try to stay backward-compatible with
> the existing code. Eventually this is not too difficult:  similar  to
> the  "ide"  or  "usb"  commands  we  could  create a new command "i2c
> device" which takes as argument the number of the I2C bus which  shal
> become  the  current  (=  active)  bus. Then all existing I2C related
> commands can be left unchanged (and "i2c  device"  without  arguments
> should of course print the ID of the current bus).
> In parallel, existing I2C commands could be changed to migrate  to  a
> new  "i2c"  group  of  commands:  "imd"  would become "i2c md", "imw"
> becomes "i2c mw", "iprobe" becomes "i2c probe", etc. For some  (long)
> transition  period old and new commands could be provided in parallel
> (at least optionally). Later, the old syntax could be dropped.
> Best regards,
> Wolfgang Denk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060516/2d97f759/attachment.htm 

More information about the U-Boot mailing list