Module Name: src
Committed By: skrll
Date: Sat May 9 12:04:11 UTC 2009
Modified Files:
src/sys/arch/hp700/dev: pdc.c
Log Message:
No need to do the hp700_pagezero_{,un}map dance to get the pdc entry point
as it's stashed in pdc - just use pdc.
Update a comment while I'm here.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hp700/dev/pdc.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/hp700/dev/pdc.c
diff -u src/sys/arch/hp700/dev/pdc.c:1.29 src/sys/arch/hp700/dev/pdc.c:1.30
--- src/sys/arch/hp700/dev/pdc.c:1.29 Sat May 9 01:59:17 2009
+++ src/sys/arch/hp700/dev/pdc.c Sat May 9 12:04:11 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: pdc.c,v 1.29 2009/05/09 01:59:17 tsutsui Exp $ */
+/* $NetBSD: pdc.c,v 1.30 2009/05/09 12:04:11 skrll Exp $ */
/* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.29 2009/05/09 01:59:17 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pdc.c,v 1.30 2009/05/09 12:04:11 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -118,7 +118,9 @@
pagezero_cookie = hp700_pagezero_map();
- /* XXX locore've done it XXX pdc = (pdcio_t)PAGE0->mem_pdc; */
+ /*
+ * locore has updated pdc with (pdcio_t)PAGE0->mem_pdc
+ */
pz_kbd = &PAGE0->mem_kbd;
pz_cons = &PAGE0->mem_cons;
@@ -455,13 +457,10 @@
static int
pdcgettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
{
- int pagezero_cookie;
int error;
- pagezero_cookie = hp700_pagezero_map();
- error = pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_READ,
+ error = pdc_call((iodcio_t)pdc, 1, PDC_TOD, PDC_TOD_READ,
&tod, 0, 0, 0, 0, 0);
- hp700_pagezero_unmap(pagezero_cookie);
if (error == 0) {
tvp->tv_sec = tod.sec;
@@ -473,15 +472,12 @@
static int
pdcsettod(todr_chip_handle_t tch, volatile struct timeval *tvp)
{
- int pagezero_cookie;
int error;
tod.sec = tvp->tv_sec;
tod.usec = tvp->tv_usec;
- pagezero_cookie = hp700_pagezero_map();
- error = pdc_call((iodcio_t)PAGE0->mem_pdc, 1, PDC_TOD, PDC_TOD_WRITE,
+ error = pdc_call((iodcio_t)pdc, 1, PDC_TOD, PDC_TOD_WRITE,
tod.sec, tod.usec);
- hp700_pagezero_unmap(pagezero_cookie);
return error;
}