From: <bob...@us...> - 2007-06-23 06:16:56
|
Revision: 1051 http://svn.sourceforge.net/hackndev/?rev=1051&view=rev Author: bobofdoom Date: 2007-06-22 23:16:53 -0700 (Fri, 22 Jun 2007) Log Message: ----------- l4p: Removed time hacks. Use RTC SA1100 time hacks instead. Patch thanks to step2back. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/time.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/time.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/time.c 2007-06-23 06:13:38 UTC (rev 1050) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/time.c 2007-06-23 06:16:53 UTC (rev 1051) @@ -29,30 +29,15 @@ #include <asm/mach/time.h> #include <asm/arch/pxa-regs.h> -#ifdef CONFIG_RTC_EPOCH -#define PL_ODDS (1970-CONFIG_RTC_EPOCH) -#else -#define PL_ODDS 0 -#endif - -#define SECS_PER_DAY 24*60*60 -#define SECS_PER_LEAP (SECS_PER_DAY*366) -#define SECS_PER_OTHER (SECS_PER_DAY*365) -#define SECS_LY (((PL_ODDS-(PL_ODDS % 4))/4)*SECS_PER_LEAP) -#define SECS_OY ((PL_ODDS-((PL_ODDS-(PL_ODDS % 4))/4))*SECS_PER_OTHER) -#define SECS_ODDS_SUM (SECS_LY+SECS_OY) - static inline unsigned long pxa_get_rtc_time(void) { - return RCNR - SECS_ODDS_SUM; + return RCNR; } static int pxa_set_rtc(void) { unsigned long current_time = xtime.tv_sec; - current_time += SECS_ODDS_SUM; - if (RTSR & RTSR_ALE) { /* make sure not to forward the clock over an alarm */ unsigned long alarm = RTAR; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |