[RFC] Option to disable mapping genrtc calls to ppc_md calls

Geert Uytterhoeven geert at linux-m68k.org
Tue Jan 18 20:20:34 EST 2005

On Mon, 17 Jan 2005, Mark A. Greer wrote:
> 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.

How is this solved by your patch if genrtc is builtin? How is your solution
different from setting ppc_md.get_rtc_time to your get_rtc_time routine?

> 2) Its ppc-specific.  Implementing get_rtc_time() et. al. directly makes it
> generic across all architectures.

... but prevents you from building a kernel that supports both normal RTCs and
your i2c RTC.



Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

More information about the Linuxppc-dev mailing list