Thread (2 messages) flat view 2 messages, 2 authors, 2003-02-03

Re: powerpc board without RTC

From: Adrian Cox <hidden>
Date: 2003-02-03 09:32:16

On Sun, 2 Feb 2003 15:32:51 -0600
"Yu Bo-BOYU1" [off-list ref] 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help