Thread (2 messages) 2 messages, 2 authors, 2003-04-23

RE: Opps...with ELDK-2.1.0 (ppc_4xx)

From: Eugene Surovegin <hidden>
Date: 2003-04-23 17:24:34

At 10:18 AM 4/23/2003, Montgomery, Tim wrote:
[Wolfgang]
quoted
quoted
This means you have a RTC on the I2C bus, right? Same here. It  works
fine on all baords except those with a I2C based RTC. Which is why we
detected the problem so late.
[Eugene]
quoted
It looks like a bug in m41t00_set_rtc_time.

Generic I2C layer is very high-level subsystem and can not be
used from the interrupt context.
If the i2c layer cannot be used in the (e.g. timer) interrupt context,
wouldn't that preclude the use of the i2c layer to provide support (i.e.
clock updates) to an i2c-based rtc?
Unfortunately, it looks so
Any suggestions on how to work around this?
We can start kernel thread and call i2c from it (or maybe use one which is
already available in the kernel?) .
<foo>_set_rtc_time will notify this thread when it needs to update RTC from
interrupt.

If you worry about accuracy, we may also remember "jiffies" at the time of
<foo>_set_rtc_time and adjust time accordingly when calling i2c (but I
doubt it's worth it).

Eugene


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help