All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON
@ 2007-02-23 21:57 Andrew Klossner
  2007-02-24  5:48 ` Stefan Roese
  2007-02-26 17:46 ` Scott Wood
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Klossner @ 2007-02-23 21:57 UTC (permalink / raw)
  To: u-boot

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.

We've been using this chip for a few years with a proprietary OS
and are now switching to u-boot and Linux.  I revised the u-boot
driver based on our stable driver.  Besides fixing the oscillator bit,
I set it up to read all the registers with a single IIC transaction
for efficiency and to see any error code from the IIC subsystem.

I would attach the new driver here but I can't figure out how.
I'm typing through a broken "hello new user, we don't yet trust you"
web page.  If somebody could send instructions to
andrew at cesa.opbu.xerox.com, I'd like to submit this revision.

Andrew Klossner

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON
  2007-02-23 21:57 [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON Andrew Klossner
@ 2007-02-24  5:48 ` Stefan Roese
  2007-02-26 17:46 ` Scott Wood
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2007-02-24  5:48 UTC (permalink / raw)
  To: u-boot

Andrew,

On Friday 23 February 2007 22:57, 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.

A quick look shows that this driver is used by the Freescale MPC8349EMDS & 
MPC8360EMDS board ports. Some of the Freescale guys (Kim?) should jump in 
here.

> We've been using this chip for a few years with a proprietary OS
> and are now switching to u-boot and Linux.  I revised the u-boot
> driver based on our stable driver.  Besides fixing the oscillator bit,
> I set it up to read all the registers with a single IIC transaction
> for efficiency and to see any error code from the IIC subsystem.
>
> I would attach the new driver here but I can't figure out how.
> I'm typing through a broken "hello new user, we don't yet trust you"
> web page.  If somebody could send instructions to
> andrew at cesa.opbu.xerox.com, I'd like to submit this revision.

For submitting patches please take a look at the section "Submitting Patches:" 
at the end of the README file. Nowadays patches created using git are even 
better (like in the Linux kernel development).

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON
  2007-02-23 21:57 [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON Andrew Klossner
  2007-02-24  5:48 ` Stefan Roese
@ 2007-02-26 17:46 ` Scott Wood
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Wood @ 2007-02-26 17:46 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-26 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-23 21:57 [U-Boot-Users] rtc/ds1374.c turns clock OFF when it means to turn it ON Andrew Klossner
2007-02-24  5:48 ` Stefan Roese
2007-02-26 17:46 ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.