Module Name:    src
Committed By:   tsutsui
Date:           Sat Jun 26 00:25:02 UTC 2010

Modified Files:
        src/sys/arch/hpcarm/conf: JORNADA720 JORNADA820 WZERO3
        src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c

Log Message:
If options RTC_OFFSET is not specified use bootinfo->timezone passed
by hpcboot.exe as well as other hpc* ports.  Noticed by u...@.
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


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hpcarm/conf/JORNADA720
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hpcarm/conf/JORNADA820
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hpcarm/conf/WZERO3
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hpcarm/conf/JORNADA720
diff -u src/sys/arch/hpcarm/conf/JORNADA720:1.78 src/sys/arch/hpcarm/conf/JORNADA720:1.79
--- src/sys/arch/hpcarm/conf/JORNADA720:1.78	Sat May 22 19:02:08 2010
+++ src/sys/arch/hpcarm/conf/JORNADA720	Sat Jun 26 00:25:02 2010
@@ -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

Index: src/sys/arch/hpcarm/conf/JORNADA820
diff -u src/sys/arch/hpcarm/conf/JORNADA820:1.18 src/sys/arch/hpcarm/conf/JORNADA820:1.19
--- src/sys/arch/hpcarm/conf/JORNADA820:1.18	Sat Apr 17 13:36:21 2010
+++ src/sys/arch/hpcarm/conf/JORNADA820	Sat Jun 26 00:25:02 2010
@@ -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

Index: src/sys/arch/hpcarm/conf/WZERO3
diff -u src/sys/arch/hpcarm/conf/WZERO3:1.8 src/sys/arch/hpcarm/conf/WZERO3:1.9
--- src/sys/arch/hpcarm/conf/WZERO3:1.8	Fri Jun 25 17:53:28 2010
+++ src/sys/arch/hpcarm/conf/WZERO3	Sat Jun 26 00:25:02 2010
@@ -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

Index: src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c
diff -u src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.7 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.8
--- src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c:1.7	Thu May 13 21:01:59 2010
+++ src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c	Sat Jun 26 00:25:02 2010
@@ -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.
 	 */

Index: src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c
diff -u src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.1 src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.2
--- src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c:1.1	Sat Apr 17 13:36:21 2010
+++ src/sys/arch/hpcarm/hpcarm/sa11x0_hpc_machdep.c	Sat Jun 26 00:25:02 2010
@@ -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.
 	 */

Reply via email to