[RFC] Option to disable mapping genrtc calls to ppc_md calls
Mark A. Greer
mgreer at mvista.com
Tue Jan 18 08:10:00 EST 2005
All,
I have a platform with an i2c rtc chip. Since much of the code for an
rtc driver is already in drivers/char/genrtc.c, I would like to reuse
that code and directly implement get_rtc_time(), et. al. in the rtc
driver. The problem is that include/asm-ppc/rtc.h assumes that
get_rtc_time(), et. al. should be mapped to ppc_md.get_rtc_time() et.
al. To work around this, I made an option to turn off that assumption.
The patch is included.
There are 2 reasons to not use the ppc_md.get_rtc_time() et. al. interfaces:
1) They are called before the i2c driver is initialized and even loaded
if its a module.
2) Its ppc-specific. Implementing get_rtc_time() et. al. directly makes
it generic across all architectures.
Is there a better way to do this?
Comments welcome.
Mark
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtc.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20050117/fba33204/attachment.asc>
More information about the Linuxppc-dev
mailing list