Registering RTC access methods in platform_init()
David Müller (ELSOFT AG)
d.mueller at elsoft.ch
Wed Oct 24 19:35:12 EST 2001
Hello
I have a question regarding the registering of the RTC access methods in
platform_init() in ppc4xx_setup.c.
The problem is quite similar to the one i stated in
one of my previous e-mails "Additional IRQ handlers in ppc4xx_init_IRQ()".
Currently this is done in this way:
#ifdef CONFIG_PPC_RTC
/* new timer stuff */
ppc_md.time_init = todc_time_init;
ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.get_rtc_time = todc_get_rtc_time;
#if !defined(CONFIG_PIP405) && !defined(CONFIG_MIP405)
ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val;
#else
ppc_md.nvram_read_val = todc_mc146818_read_val;
ppc_md.nvram_write_val = todc_mc146818_write_val;
#endif
#endif
All other ports using a MC146818 RTC have their own xxx_setup.c file
(Sandpoint, Adirondack, ...).
I suppose the preferred way to solve this is to replace this whole init
code by a call to a board specific init routine?
Dave
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list