summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-03-31 04:05:36 +0000
committerbde <bde@FreeBSD.org>1996-03-31 04:05:36 +0000
commitb26bbde39abed59833a579d4dc9ef2c51c4ae0aa (patch)
tree593fa91693fefd4a4c0ff91c25c705e7554e493d /sys/isa
parent20ef589c863a5318deea9fcbefdfa88744a4ea4e (diff)
downloadFreeBSD-src-b26bbde39abed59833a579d4dc9ef2c51c4ae0aa.zip
FreeBSD-src-b26bbde39abed59833a579d4dc9ef2c51c4ae0aa.tar.gz
Moved rtcin() to clock.c.
Always delay using one inb(0x84) after each i/o in rtcin() - don't do this conditional on the bogus option DUMMY_NOPS not being defined. If you want an optionally slightly faster rtcin() again, then inline it and use a better named option or sysctl variable. It only needs to be fast in rtcintr().
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atrtc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index d9ae373..b4a01ce 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
+ * $Id: clock.c,v 1.53 1996/03/23 21:36:03 nate Exp $
*/
/*
@@ -400,6 +400,19 @@ sysbeep(int pitch, int period)
* RTC support routines
*/
+int
+rtcin(reg)
+ int reg;
+{
+ u_char val;
+
+ outb(IO_RTC, reg);
+ inb(0x84);
+ val = inb(IO_RTC + 1);
+ inb(0x84);
+ return (val);
+}
+
static __inline void
writertc(u_char reg, u_char val)
{
OpenPOWER on IntegriCloud