aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dec/mcclockvar.h
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1998-06-14 13:46:10 +0000
committerDoug Rabson <dfr@FreeBSD.org>1998-06-14 13:46:10 +0000
commit99d11cde56ea2fb7b02c14ee57917b6b07f7ce35 (patch)
treed143d061995f1ac76d9c277b82e63947603f68a1 /sys/dev/dec/mcclockvar.h
parent25874f75bcc49781e5e232464af7e9f4b0555cbd (diff)
downloadsrc-99d11cde56ea2fb7b02c14ee57917b6b07f7ce35.tar.gz
src-99d11cde56ea2fb7b02c14ee57917b6b07f7ce35.zip
Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have attached children. * Support dynamically extendable interfaces for drivers to replace both the function pointers in driver_t and bus_ops_t (which has been removed entirely. Two system defined interfaces have been defined, 'device' which is mandatory for all devices and 'bus' which is recommended for all devices which support attached children. * In addition, the alpha port defines two simple interfaces 'clock' for attaching various real time clocks to the system and 'mcclock' for the many different variations of mc146818 clocks which can be attached to different alpha platforms. This eliminates two more function pointer tables in favour of the generic method dispatch system provided by the device framework. Future device interfaces may include: * cdev and bdev interfaces for devfs to use in replacement for specfs and the fixed interfaces bdevsw and cdevsw. * scsi interface to replace struct scsi_adapter (not sure how this works in CAM but I imagine there is something similar there). * various tailored interfaces for different bus types such as pci, isa, pccard etc.
Notes
Notes: svn path=/head/; revision=36972
Diffstat (limited to 'sys/dev/dec/mcclockvar.h')
-rw-r--r--sys/dev/dec/mcclockvar.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/dec/mcclockvar.h b/sys/dev/dec/mcclockvar.h
index d2c0ac82e9bf..0c9f5df8d816 100644
--- a/sys/dev/dec/mcclockvar.h
+++ b/sys/dev/dec/mcclockvar.h
@@ -27,15 +27,9 @@
* rights to redistribute these changes.
*/
-struct mcclock_softc {
- device_t sc_dev;
- const struct mcclock_busfns *sc_busfns;
-};
+#include "mcclock_if.h"
-struct mcclock_busfns {
- void (*mc_bf_write) __P((struct mcclock_softc *, u_int, u_int));
- u_int (*mc_bf_read) __P((struct mcclock_softc *, u_int));
-};
-
-void mcclock_attach __P((struct mcclock_softc *,
- const struct mcclock_busfns *));
+void mcclock_attach(device_t dev);
+void mcclock_init(device_t);
+void mcclock_get(device_t, time_t, struct clocktime *);
+void mcclock_set(device_t, struct clocktime *);