summaryrefslogtreecommitdiff
path: root/sys/dev/tc/tcvar.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-05-02 22:56:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-05-02 22:56:08 +0000
commitf69ff2bae348f49f6e5fccbf1594b839e98792ef (patch)
tree984c07207f03eebcb847988db98df196a848c27e /sys/dev/tc/tcvar.h
parentd7aff648af7518e317842f78e06a3d197eca9629 (diff)
Big TURBOchannel support catchup from NetBSD, part 1.
A few local changes and tweaks remain. This bring DEC 3000 machines back in the game, but framebuffers are still not supported at the moment. Thanks to ericj@ and nate@ for supplying me a DEC 3000 for testing.
Diffstat (limited to 'sys/dev/tc/tcvar.h')
-rw-r--r--sys/dev/tc/tcvar.h77
1 files changed, 40 insertions, 37 deletions
diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h
index 9725a823a6d..4c563692a76 100644
--- a/sys/dev/tc/tcvar.h
+++ b/sys/dev/tc/tcvar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: tcvar.h,v 1.9 2002/03/14 03:16:08 millert Exp $ */
-/* $NetBSD: tcvar.h,v 1.7 1996/10/22 21:37:31 cgd Exp $ */
+/* $OpenBSD: tcvar.h,v 1.10 2002/05/02 22:56:06 miod Exp $ */
+/* $NetBSD: tcvar.h,v 1.17 2000/06/04 19:15:15 cgd Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
#define __DEV_TC_TCVAR_H__
/*
- * Definitions for TurboChannel autoconfiguration.
+ * Definitions for TURBOchannel autoconfiguration.
*/
#include <machine/bus.h>
@@ -41,23 +41,16 @@
/*
* Machine-dependent definitions.
*/
-#if !defined(__alpha__)
-ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
-#endif
-#ifdef __alpha__
-#include <alpha/tc/tc_machdep.h>
-#endif
+#include <machine/tc_machdep.h>
/*
- * In the long run, the following block will go completely away
- * (i.e. both parts of the #if, including the #include, etc.).
- * For now, the MI TC code still uses the old definitions provided
- * by the pmax port, and not the new definitions provided by the
- * alpha port.
+ * In the long run, the following block will go completely away.
+ * For now, the MI TC code still uses the old TC_IPL_ names
+ * and not the new IPL_ names.
*/
-#ifdef __alpha__
+#if 1
/*
- * On the alpha, map the new definitions to the old.
+ * Map the new definitions to the old.
*/
#include <machine/intr.h>
@@ -68,17 +61,28 @@ ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
#define TC_IPL_NET IPL_NET
#define TC_IPL_TTY IPL_TTY
#define TC_IPL_CLOCK IPL_CLOCK
+#endif /* 1 */
-#endif
+struct tc_softc {
+ struct device sc_dv;
+
+ int sc_speed;
+ int sc_nslots;
+ struct tc_slotdesc *sc_slots;
+
+ const struct evcnt *(*sc_intr_evcnt)(struct device *, void *);
+ void (*sc_intr_establish)(struct device *, void *,
+ int, int (*)(void *), void *);
+ void (*sc_intr_disestablish)(struct device *, void *);
+ bus_dma_tag_t (*sc_get_dma_tag)(int);
+};
/*
- * Arguments used to attach TurboChannel busses.
+ * Arguments used to attach TURBOchannel busses.
*/
struct tcbus_attach_args {
char *tba_busname; /* XXX should be common */
-#ifdef __alpha__ /* XXX */
bus_space_tag_t tba_memt;
-#endif
/* Bus information */
u_int tba_speed; /* see TC_SPEED_* below */
@@ -89,18 +93,19 @@ struct tcbus_attach_args {
/* TC bus resource management; XXX will move elsewhere eventually. */
+ const struct evcnt *(*tba_intr_evcnt)(struct device *, void *);
void (*tba_intr_establish)(struct device *, void *,
- tc_intrlevel_t, int (*)(void *), void *);
+ int, int (*)(void *), void *);
void (*tba_intr_disestablish)(struct device *, void *);
+ bus_dma_tag_t (*tba_get_dma_tag)(int);
};
/*
- * Arguments used to attach TurboChannel devices.
+ * Arguments used to attach TURBOchannel devices.
*/
struct tc_attach_args {
-#ifdef __alpha__ /* XXX */
bus_space_tag_t ta_memt;
-#endif
+ bus_dma_tag_t ta_dmat;
char ta_modname[TC_ROM_LLEN+1];
u_int ta_slot;
@@ -111,8 +116,8 @@ struct tc_attach_args {
};
/*
- * Description of TurboChannel slots, provided by machine-dependent
- * code to the TurboChannel bus driver.
+ * Description of TURBOchannel slots, provided by machine-dependent
+ * code to the TURBOchannel bus driver.
*/
struct tc_slotdesc {
tc_addr_t tcs_addr;
@@ -121,8 +126,8 @@ struct tc_slotdesc {
};
/*
- * Description of built-in TurboChannel devices, provided by
- * machine-dependent code to the TurboChannel bus driver.
+ * Description of built-in TURBOchannel devices, provided by
+ * machine-dependent code to the TURBOchannel bus driver.
*/
struct tc_builtin {
char *tcb_modname;
@@ -134,12 +139,16 @@ struct tc_builtin {
/*
* Interrupt establishment functions.
*/
-void tc_intr_establish(struct device *, void *, tc_intrlevel_t,
- int (*)(void *), void *);
+int tc_checkslot(tc_addr_t, char *);
+void tc_devinfo(const char *, char *);
+void tcattach(struct device *, struct device *, void *);
+const struct evcnt *tc_intr_evcnt(struct device *, void *);
+void tc_intr_establish(struct device *, void *, int, int (*)(void *),
+ void *);
void tc_intr_disestablish(struct device *, void *);
/*
- * Easy to remember names for TurboChannel device locators.
+ * Easy to remember names for TURBOchannel device locators.
*/
#define tccf_slot cf_loc[0] /* slot */
#define tccf_offset cf_loc[1] /* offset */
@@ -153,10 +162,4 @@ void tc_intr_disestablish(struct device *, void *);
#define TC_SPEED_12_5_MHZ 0 /* 12.5MHz TC bus */
#define TC_SPEED_25_MHZ 1 /* 25MHz TC bus */
-/*
- * The TurboChannel bus cfdriver, so that subdevices can more
- * easily tell what bus they're on.
- */
-extern struct cfdriver tc_cd;
-
#endif /* __DEV_TC_TCVAR_H__ */