powerpc board without RTC

Adrian Cox adrian at humboldt.co.uk
Mon Feb 3 20:32:16 EST 2003


On Sun, 2 Feb 2003 15:32:51 -0600
"Yu Bo-BOYU1" <Bo.Yu at motorola.com> wrote:
> Any recommendation how I should do to avoid RTC. I really don't care
> about time of day stuff except the system tick.

I've supported several boards like this. I recommend using the generic
RTC driver, and supplying a dummy initialisation routine.

In your setup_arch routine:

	    ppc_md.set_rtc_time = dummy_set_rtc_time;
	    ppc_md.get_rtc_time = dummy_get_rtc_time;

and the dummy code looks like:
static int dummy_set_rtc_time(unsigned long nowtime)
{
    	return -1;
}

static unsigned long dummy_get_rtc_time(void)
{
	/* Pick a date */
    	return mktime(2001, 1, 1, 12, 0, 0);
}

- Adrian Cox
http://www.humboldt.co.uk/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list