[i2c] Question on ds1339's oscillator
Rodolfo Giometti
giometti at enneenne.com
Sat Jun 16 15:51:10 CEST 2007
On Fri, Jun 15, 2007 at 09:24:33AM -0700, David Brownell wrote:
>
> Erm, not at all. The oscillator is what drives the RTC
> clock ... you know, the tick/tock/tick/tock/... part.
> RTCs just count oscillator cycles. If no oscillator is
> running, the reported time will never change.
>
> The square wave output is a different thing entirely.
> Oscillator output may optionally be sent out on one pin
> of many RTCs (probably divided down) ... maybe the board
> needs a 32 kiHz signal to drive another circuit.
If so, why does my RTC work even if the bit EOSC is off?
> The boot loader can do it, but more likely that was done as part
> of manufacturing the board ... along with initializing the clock
> used by the RTC.
Mmm...
> > I think that we should force IRQ output if the board configuration
> > define an irq line otherwise we can the square wave form as outout.
>
> And when the Linux configuration was a mistake, and then the
> circuit which needed that clock stops working correctly ...?
>
> If the board setup provides an IRQ and the chip is configured
> to generate square wave output, that's clearly a bug somewhere.
>
> Issuing a warning is clearly appropriate. Reconfiguring the
> hardware, on the assumption that the Linux config is right,
> seems dangerous to me. That's not a good way to fix bugs in
> the production line (including the bootloader).
I don't agree.
1) If you are the kernel programmer you MUST to know what you are
doing, so if you select the IRQ line this means that your board MUST
use the IRQ line and NOT the square wave.
2) The boot loader should init the board JUST for the boot, then the
kernel should configure the whole system for proper use.
In any case the kernel must have the last word in system setup.
This is the u-boot way. :)
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lm-sensors.org/pipermail/i2c/attachments/20070616/d3eb8be5/attachment.bin
More information about the i2c
mailing list