Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcarm If options RTC_OFFSET is not specified use b...



details:   https://anonhg.NetBSD.org/src/rev/4055acbf0d26
branches:  trunk
changeset: 755866:4055acbf0d26
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jun 26 00:25:02 2010 +0000

description:
If options RTC_OFFSET is not specified use bootinfo->timezone passed
by hpcboot.exe as well as other hpc* ports.  Noticed by uwe@.
Also comment out options RTC_OFFSET=0 lines and note about this
in kernel config files.  Tested on WS003SH.

XXX: dup code among pxa2x0_hpc_machdep.c and sa11x0_hpc_machdep.c

diffstat:

 sys/arch/hpcarm/conf/JORNADA720             |   7 ++++---
 sys/arch/hpcarm/conf/JORNADA820             |   7 ++++---
 sys/arch/hpcarm/conf/WZERO3                 |   7 ++++---
 sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c |  14 ++++++++++++--
 sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c |  14 ++++++++++++--
 5 files changed, 36 insertions(+), 13 deletions(-)

diffs (151 lines):

diff -r 7ebc289a19c0 -r 4055acbf0d26 sys/arch/hpcarm/conf/JORNADA720
--- a/sys/arch/hpcarm/conf/JORNADA720   Sat Jun 26 00:17:13 2010 +0000
+++ b/sys/arch/hpcarm/conf/JORNADA720   Sat Jun 26 00:25:02 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: JORNADA720,v 1.78 2010/05/22 19:02:08 plunky Exp $
+#      $NetBSD: JORNADA720,v 1.79 2010/06/26 00:25:02 tsutsui Exp $
 #
 #      JORNADA -- Windows-CE based jornada 720
 #
@@ -7,14 +7,15 @@
 
 #options       INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.78 $"
+#ident                 "GENERIC-$Revision: 1.79 $"
 
 # estimated number of users
 maxusers       32
 
 # Standard system options
 
-options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+#options       RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+                               # (default timezone is passed from hpcboot)
 #options       NTP             # NTP phase/frequency locked loop
 
 # CPU options
diff -r 7ebc289a19c0 -r 4055acbf0d26 sys/arch/hpcarm/conf/JORNADA820
--- a/sys/arch/hpcarm/conf/JORNADA820   Sat Jun 26 00:17:13 2010 +0000
+++ b/sys/arch/hpcarm/conf/JORNADA820   Sat Jun 26 00:25:02 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: JORNADA820,v 1.18 2010/04/17 13:36:21 nonaka Exp $
+#      $NetBSD: JORNADA820,v 1.19 2010/06/26 00:25:02 tsutsui Exp $
 #
 #      JORNADA -- Windows-CE based jornada 820
 #
@@ -7,14 +7,15 @@
 
 #options       INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.18 $"
+#ident                 "GENERIC-$Revision: 1.19 $"
 
 # estimated number of users
 maxusers       32
 
 # Standard system options
 
-options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+#options       RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+                               # (default timezone is passed from hpcboot)
 #options       NTP             # NTP phase/frequency locked loop
 
 # CPU options
diff -r 7ebc289a19c0 -r 4055acbf0d26 sys/arch/hpcarm/conf/WZERO3
--- a/sys/arch/hpcarm/conf/WZERO3       Sat Jun 26 00:17:13 2010 +0000
+++ b/sys/arch/hpcarm/conf/WZERO3       Sat Jun 26 00:25:02 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: WZERO3,v 1.8 2010/06/25 17:53:28 tsutsui Exp $
+#      $NetBSD: WZERO3,v 1.9 2010/06/26 00:25:02 tsutsui Exp $
 #
 #      WZERO3 -- Sharp Windows Mobile 5 based PDA
 #
@@ -7,14 +7,15 @@
 
 #options       INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.8 $"
+#ident                 "GENERIC-$Revision: 1.9 $"
 
 # estimated number of users
 maxusers       32
 
 # Standard system options
 
-options        RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
+#options       RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+                               # (default timezone is passed from hpcboot)
 #options       NTP             # NTP phase/frequency locked loop
 
 # CPU options
diff -r 7ebc289a19c0 -r 4055acbf0d26 sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c       Sat Jun 26 00:17:13 2010 +0000
+++ b/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c       Sat Jun 26 00:25:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxa2x0_hpc_machdep.c,v 1.7 2010/05/13 21:01:59 nonaka Exp $    */
+/*     $NetBSD: pxa2x0_hpc_machdep.c,v 1.8 2010/06/26 00:25:02 tsutsui Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.7 2010/05/13 21:01:59 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.8 2010/06/26 00:25:02 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_dram_pages.h"
@@ -418,6 +418,16 @@
                platid.dw.dw1 = bootinfo->platid_machine;
        }
 
+#ifndef RTC_OFFSET
+       /*
+        * rtc_offset from bootinfo.timezone set by hpcboot.exe
+        */
+       if (rtc_offset == 0 &&
+           (bootinfo->timezone > (-12 * 60) &&
+            bootinfo->timezone <= (12 * 60)))
+               rtc_offset = bootinfo->timezone;
+#endif
+
        /*
         * Heads up ... Setup the CPU / MMU / TLB functions.
         */
diff -r 7ebc289a19c0 -r 4055acbf0d26 sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c
--- a/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c       Sat Jun 26 00:17:13 2010 +0000
+++ b/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c       Sat Jun 26 00:25:02 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sa11x0_hpc_machdep.c,v 1.1 2010/04/17 13:36:21 nonaka Exp $    */
+/*     $NetBSD: sa11x0_hpc_machdep.c,v 1.2 2010/06/26 00:25:02 tsutsui Exp $   */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sa11x0_hpc_machdep.c,v 1.1 2010/04/17 13:36:21 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sa11x0_hpc_machdep.c,v 1.2 2010/06/26 00:25:02 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_dram_pages.h"
@@ -270,6 +270,16 @@
                platid.dw.dw1 = bootinfo->platid_machine;
        }
 
+#ifndef RTC_OFFSET
+       /*
+        * rtc_offset from bootinfo.timezone set by hpcboot.exe
+        */
+       if (rtc_offset == 0 &&
+           (bootinfo->timezone > (-12 * 60) &&
+            bootinfo->timezone <= (12 * 60)))
+               rtc_offset = bootinfo->timezone;
+#endif
+
        /*
         * Heads up ... Setup the CPU / MMU / TLB functions.
         */



Home | Main Index | Thread Index | Old Index