[U-Boot] Odd value for I2C_TIMEOUT in fsl_i2c.c
Wolfgang Denk
wd at denx.de
Fri Sep 4 17:29:48 CEST 2009
Dear Timur Tabi,
In message <4AA12E52.2080403 at freescale.com> you wrote:
>
> > Wrong Question. I don't know enough about the I2C protocol. Why is
> > i2c_wait4bus necessary?
>
> Ok, why is it necessary?
Maybe we should remove it, when nobody knows why it's needed.
> >> Kumar, any thoughts? Is there something sneaky going on here, or did
> >> you just misinterpret the value of I2C_TIMEOUT?
> >
> > I guess I2C_TIMEOUT might always have been misinterpeted.
>
> I think the original code was correct, because it was counting clock ticks.
It cannot have been correct. get_timer() takes an argument of
milliseconds, i. e. a time. "(CONFIG_SYS_HZ / 4)" is a frequency,
i. e. not a time, but the inverse of it.
It is plain wront to write "250 per second" when you mean "250 milliseconds"
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I've been programming for (35-9=) 24 years myself, and I find the
best way to learn a new language is to *read* every example snippet I
can find, with a reference book close by. Eventually, the *rhythm* of
the language starts pounding in my head... and my fluency is close at
hand. That's how I learned Perl, and now I'm one of the drummers. :-)
-- Randal L. Schwartz in <8cvi6p2tir.fsf at gadget.cscaper.com>
More information about the U-Boot
mailing list