Having missed some of the messages before, I am not sure if i'm correct but i think this is what you need ;-) You will have to adapt the includes, e.g. i2c.h
Is there any official tree where this driver is included? (I havn't found it in ELDK 2.0.2) Cheers, Oliver > > >[Wolfgang] > > > > > > > >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] > > > 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 > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m41t00.c Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20030423/33aadbf1/attachment.txt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: m41t00.h Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20030423/33aadbf1/attachment-0001.txt