[U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON

Scott Wood scottwood at freescale.com
Mon Feb 26 18:46:56 CET 2007


On Fri, Feb 23, 2007 at 09:57:12PM +0000, Andrew Klossner wrote:
> rtc/ds1374.c mistakes the "don't enable the oscillator" bit for a
> "do enable the oscillator bit" and sets it to 1, stopping the clock.
> My guess is that nobody has actually used rtc_set or rtc_reset
> with this driver.

It doesn't set it, it clears it -- rtc_write is called with "set" set to
FALSE.

It's certainly not the clearest way to do it; there should probably be
separate functions rtc_set_bits and rtc_clear_bits (the "set" parameter
is always passed as a constant, so the runtime check isn't actually being
used).

-Scott




More information about the U-Boot mailing list