From 31de2a775174cec8c91cc03caa13f77f5686a8bd Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 22 Jul 1998 08:30:25 +0000 Subject: [PATCH] Move the mcclock from root to isa. --- sys/alpha/isa/mcclock_isa.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/alpha/isa/mcclock_isa.c b/sys/alpha/isa/mcclock_isa.c index 34b9a90031f..20643117907 100644 --- a/sys/alpha/isa/mcclock_isa.c +++ b/sys/alpha/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: mcclock_isa.c,v 1.1 1998/07/15 19:21:31 dfr Exp $ */ /* $NetBSD: mcclock_tlsb.c,v 1.8 1998/05/13 02:50:29 thorpej Exp $ */ /* @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -76,6 +77,7 @@ static devclass_t mcclock_devclass; int mcclock_isa_probe(device_t dev) { + isa_set_portsize(dev, 2); device_set_desc(dev, "MC146818A real time clock"); return 0; } @@ -90,16 +92,17 @@ mcclock_isa_attach(device_t dev) static void mcclock_isa_write(device_t dev, u_int reg, u_int val) { - outb(0x70, reg); - outb(0x71, val); + u_int port = isa_get_port(dev); + outb(port, reg); + outb(port+1, val); } static u_int mcclock_isa_read(device_t dev, u_int reg) { - outb(0x70, reg); - return inb(0x71); + u_int port = isa_get_port(dev); + outb(port, reg); + return inb(port+1); } -/* XXX put it on the root for now, later on isa */ -DRIVER_MODULE(mcclock_isa, root, mcclock_isa_driver, mcclock_devclass, 0, 0); +DRIVER_MODULE(mcclock_isa, isa, mcclock_isa_driver, mcclock_devclass, 0, 0);