[U-Boot-Users] soft_i2c and ds1307 with tqm823l

Wolfgang Denk wd at denx.de
Mon Jun 30 14:39:29 CEST 2003

Dear Seb,

in message <3F002BCA.9070609 at peak.uklinux.net> you wrote:
> I'm working on getting a ds1307 realtime clock working with a tqm823l as
> a new user to u-boot (I've never compiled u-boot or ppcboot before).

This is not correct.  You  compiled  and  installed  PPCBoot  in  our
training a year and a couple of days ago :-)

> Firstly, the ds1307 code compiles fine, but of course it needs the i2c
> code to be compiled alongside it. Although this is obvious, the newcomer
> to u-boot doesn't (i.e. I didn't) know that calling for ds1307.c to be
> compiled doesn't in itself cause the i2c code to be compiled, so a note
> to this effect in the realtime clock section of the README would be a
> helpful addition.

Please feel free to submit a patch...

> Here's a line from the README (starting at line 907):
> "If this is selected, either CONFIG_HARD_I2C or CONFIG_SOFT_I2C must
> be defined	to include the appropriate I2C driver."
> No mention is made of what values the 'appropriate driver' might have or
> where to look for them. I assume you might define something like this:
> #define CONFIG_HARD_I2C mpc8xx

No. Just "#define CONFIG_HARD_I2C" is OK, as for each  CPU  there  is
always exactly one hard-i2c and one soft-i2c driver.

> But I can't see what you'd write for CONFIG_SOFT_I2C. A bit more
> clarification here would be useful.

	#define	CONFIG_SOFT_I2C

It must be defined - that's all :-)

> There are a number of extra defines related to CONFIG_SOFT_I2C, such as
> I2C_INIT, I2C_PORT, etc. It's not too clear what these should be set to.
> The diff between my TQM823L.h and the original TQM823L.h is (also
> attached as changes.diff):

No diff attached.

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
There are two ways of constructing a software design. One way  is  to
make  it  so  simple that there are obviously no deficiencies and the
other is to make it so complicated that there are  no  obvious  defi-
ciencies.                             - Charles Anthony Richard Hoare

More information about the U-Boot mailing list