[RFC] Option to disable mapping genrtc calls to ppc_md calls
Tom Rini
trini at kernel.crashing.org
Wed Jan 19 03:15:15 EST 2005
On Mon, Jan 17, 2005 at 02:10:00PM -0700, Mark A. Greer wrote:
> 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.
But they check if it's set, so they can be assigned later and this is
OK.
> 2) Its ppc-specific. Implementing get_rtc_time() et. al. directly makes
> it generic across all architectures.
Guessing, this is for a marvell chipset that's found on MIPS too.
> Is there a better way to do this?
How about we try borrowing the MIPS abstraction and force todc_time,
pmac_time (any others?) to directly define (and EXPORT_SYMBOL)
get_rtc_time / set_rtc_time / etc.
--
Tom Rini
http://gate.crashing.org/~trini/
More information about the Linuxppc-dev
mailing list