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

Ben Warren bwarren at qstreams.com
Fri May 12 20:47:46 CEST 2006


Marc,

The [.0, .1, .2] refers to the size of the address in bytes, since some
of the bigger EEPROMs (and maybe other things) can address larger than 8
bits.

/*
		 * I2C data address within the chip.  This can be 1 or
		 * 2 bytes long.  Some day it might be 3 bytes long :-).
		 */
		addr = simple_strtoul(argv[2], NULL, 16);
		alen = 1;
		for(j = 0; j < 8; j++) {
			if (argv[2][j] == '.') {
				alen = argv[2][j+1] - '0';
				if (alen > 4) {
					printf ("Usage:\n%s\n", cmdtp->usage);
					return 1;
				}
				break;
			} else if (argv[2][j] == '\0') {
				break;
			}
		}

regards,
Ben

On Fri, 2006-05-12 at 11:37 -0700, Howard, Marc wrote:
> I had always assumed from reading the U-Boot guide that:
> 
> imd chip address[.0, .1, .2] [# of objects]
> 
> ...meant that imd 50.1 would read I2C address 50 on controller #1.  If
> that's not the case then what does the [.0, .1, .2] option do??
> 
> Marc W. Howard
> 
> > -----Original Message-----
> > From: u-boot-users-admin at lists.sourceforge.net 
> > [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf 
> > Of Kumar Gala
> > Sent: Friday, May 12, 2006 11:00 AM
> > To: bwarren at qstreams.com
> > Cc: u-boot-users at lists.sourceforge.net
> > Subject: Re: [U-Boot-Users] Using a second I2C interface
> > 
> > 
> > On May 12, 2006, at 9:36 AM, Ben Warren wrote:
> > 
> > > Hello,
> > >
> > > 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.
> > 
> > - kumar
> > 
> > 
> > -------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web 
> > services, security?
> > Get stuff done quickly with pre-integrated technology to make 
> > your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on 
> > Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
> dat=121642
> > _______________________________________________
> > U-Boot-Users mailing list
> > U-Boot-Users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/u-boot-users
> > 





More information about the U-Boot mailing list