[RFC] Option to disable mapping genrtc calls to ppc_md calls
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Jan 21 09:25:56 EST 2005
On Mon, 2005-01-17 at 14:10 -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.
> 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?
The patch is going backward since it disables the ability to have
runtime selection of the RTC chip.
</me deletes some sarcastic comments about embedded companies not
caring about anything but gross hacks for every board>
More information about the Linuxppc-dev
mailing list