[U-Boot-Users] Using a second I2C interface
r-woodruff2 at ti.com
Tue May 16 21:57:11 CEST 2006
I work with Nishanth and he has already presented what he added. I've
no comment beyond that (other than it works well for us).
From: u-boot-users-admin at lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf Of Ben
Sent: Tuesday, May 16, 2006 8:50 AM
To: Wolfgang Denk
Cc: Kumar Gala; u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Using a second I2C interface
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:
in message <E541A453-EC07-4597-8D60-2EE3919C1A18 at kernel.crashing.org>
> > 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the U-Boot