From 0b635e75c028043d46719964954240b8b5732c64 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Thu, 7 May 2009 17:30:59 +0000 Subject: [PATCH] Pass proper timeval args to pdc_call() to save TOD with PDC_TOD_WRITE, Per OpenBSD's hppa/dev/clock.c rev 1.14. Tested on my 735/125 with a new lithium battery, okay'ed by skrll@. --- sys/arch/hp700/dev/pdc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/arch/hp700/dev/pdc.c b/sys/arch/hp700/dev/pdc.c index bf6579ee5e46..05a372f47680 100644 --- a/sys/arch/hp700/dev/pdc.c +++ b/sys/arch/hp700/dev/pdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: pdc.c,v 1.26 2009/05/07 15:34:49 skrll Exp $ */ +/* $NetBSD: pdc.c,v 1.27 2009/05/07 17:30:59 tsutsui Exp $ */ /* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */ @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.26 2009/05/07 15:34:49 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.27 2009/05/07 17:30:59 tsutsui Exp $"); #include #include @@ -476,7 +476,8 @@ pdcsettod(todr_chip_handle_t tch, volatile struct timeval *tvp) tod.usec = tvp->tv_usec; pagezero_cookie = hp700_pagezero_map(); - pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_WRITE, &tod); + pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_WRITE, + tod.sec, tod.usec); hp700_pagezero_unmap(pagezero_cookie); return 0; }