Patchwork PPC: set default date on PPC without RTC

login
register
mail settings
Submitter Wladislav Wiebe
Date Sept. 11, 2013, 9:39 a.m.
Message ID <52303A6A.2050702@gmail.com>
Download mbox | patch
Permalink /patch/274207/
State Rejected
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Wladislav Wiebe - Sept. 11, 2013, 9:39 a.m.
Hello guys,

would like to ask if there is a proper possibility on PPC to
set default date (basically the year). The board has no RTC chip,
and I would need instead of 1970 another year.

For some reason does e.g:


not work to me. Is there also another place which should be changed?
(I know it can be changed from userspace also, but I would need it before userspace)


Thanks and BR,
Wladislav Wiebe

Patch

--- a/linux/arch/powerpc/kernel/time.c
+++ b/linux/arch/powerpc/kernel/time.c
@@ -1099,7 +1099,7 @@  void __init time_init(void)


 #define FEBRUARY       2
-#define        STARTOFTIME     1970
+#define        STARTOFTIME     2013
 #define SECDAY         86400L
 #define SECYR          (SECDAY * 365)
 #define        leapyear(year)          ((year) % 4 == 0 && \