diff options
| author | leo <leo@NetBSD.org> | 1996-01-06 20:10:41 +0000 |
|---|---|---|
| committer | leo <leo@NetBSD.org> | 1996-01-06 20:10:41 +0000 |
| commit | 356a61ab951b8d5157fa38e0632e272a7ec0fd01 (patch) | |
| tree | f6c0a1de05010c172f2515de5c432a8e1675d1c1 /sys/arch/atari/dev/clock.c | |
| parent | 0c5975cdd38e4e3eed9db0d3257a20efef12c5a0 (diff) | |
Add an nvram-driver. This driver makes it possible to read/write the
configuration info stored in the nvram on the mc146818.
Diffstat (limited to 'sys/arch/atari/dev/clock.c')
| -rw-r--r-- | sys/arch/atari/dev/clock.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/arch/atari/dev/clock.c b/sys/arch/atari/dev/clock.c index aee79a46bfd..5baf74c1dd3 100644 --- a/sys/arch/atari/dev/clock.c +++ b/sys/arch/atari/dev/clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.6 1995/12/01 19:51:53 leo Exp $ */ +/* $NetBSD: clock.c,v 1.7 1996/01/06 20:11:06 leo Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -314,6 +314,26 @@ profclock(pc, ps) } #endif +/*********************************************************************** + * Real Time Clock support * + ***********************************************************************/ + +u_int mc146818_read(rtc, regno) +void *rtc; +u_int regno; +{ + ((struct rtc *)rtc)->rtc_regno = regno; + return(((struct rtc *)rtc)->rtc_data & 0377); +} + +void mc146818_write(rtc, regno, value) +void *rtc; +u_int regno, value; +{ + ((struct rtc *)rtc)->rtc_regno = regno; + ((struct rtc *)rtc)->rtc_data = value; +} + /* * Initialize the time of day register, based on the time base which is, e.g. * from a filesystem. |
