+int ctprobe(), ctattach(), ctintr();
+struct uba_device *ctdinfo[NCT];
+u_short ctstd[] = { 0167770, 0 };
+struct uba_driver ctdriver =
+ { ctprobe, 0, ctattach, 0, ctstd, "ct", ctdinfo };
+
+#define CTUNIT(dev) (minor(dev))
+
+int ct_init = 0; /* set to CSR1 for testing loopback on controller */
+
+ctprobe(reg)
+ caddr_t reg;
+{
+ register int br, cvec; /* value-result */
+ register struct ctdevice *ctaddr = (struct ctdevice *)reg;
+
+#ifdef lint
+ br = 0; cvec = br; br = cvec;
+ ctintr(0);
+#endif
+ /*
+ * There is no way to make a DR11c interrupt without some
+ * external support. We can't always trust that the typesetter
+ * will be online and ready so we've made other provisions.
+ * This probe assumes setting the B Int Enb will generate
+ * an interrupt. To do this, we set CSR0 and loop this back
+ * to REQUEST_B in the second plug on the controller.
+ * Then, we reset the vector to be that for the "real" device.
+ */
+ ctaddr->ctcsr = INT_ENB_B | CSR0; /* Assume hardware loopback! */
+ DELAY(1000);
+ ctaddr->ctcsr = ct_init; /* should be CSR1 for loopback testing */
+ if (cvec & 04) {
+ printf("ct: resetting vector %o to %o\n", cvec, cvec&0773);
+ cvec &= 0773;
+ }
+ return (sizeof (struct ctdevice));
+}
+
+/*ARGSUSED*/
+ctattach(ui)
+ struct uba_device *ui;
+{
+}