-/* $OpenBSD: grf_dv.c,v 1.4 1997/02/03 04:47:26 downsj Exp $ */
+/* $OpenBSD: grf_dv.c,v 1.5 1997/02/05 16:01:09 downsj Exp $ */
/* $NetBSD: grf_dv.c,v 1.10 1997/01/30 09:18:45 thorpej Exp $ */
/*
grf = (caddr_t)IIOV(GRFIADDR);
sc->sc_scode = -1; /* XXX internal i/o */
- grfdev_attach(sc, dv_init, grf, &dvbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, dv_init, grf, &dvbox_grfsw, &dvbox_itesw);
+#else
+ grfdev_attach(sc, dv_init, grf, &dvbox_grfsw, NULL);
+#endif /* NITE > 0 */
}
int
}
}
- grfdev_attach(sc, dv_init, grf, &dvbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, dv_init, grf, &dvbox_grfsw, &dvbox_itesw);
+#else
+ grfdev_attach(sc, dv_init, grf, &dvbox_grfsw, NULL);
+#endif
}
/*
-/* $OpenBSD: grf_gb.c,v 1.4 1997/02/03 04:47:27 downsj Exp $ */
+/* $OpenBSD: grf_gb.c,v 1.5 1997/02/05 16:01:11 downsj Exp $ */
/* $NetBSD: grf_gb.c,v 1.10 1997/01/30 09:18:45 thorpej Exp $ */
/*
grf = (caddr_t)IIOV(GRFIADDR);
sc->sc_scode = -1; /* XXX internal i/o */
- grfdev_attach(sc, gb_init, grf, &gbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, gb_init, grf, &gbox_grfsw, &gbox_itesw);
+#else
+ grfdev_attach(sc, gb_init, grf, &gbox_grfsw, NULL);
+#endif /* NITE > 0 */
}
int
}
}
- grfdev_attach(sc, gb_init, grf, &gbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, gb_init, grf, &gbox_grfsw, &gbox_itesw);
+#else
+ grfdev_attach(sc, gb_init, grf, &gbox_grfsw, NULL);
+#endif /* NITE > 0 */
}
/*
-/* $OpenBSD: grf_hy.c,v 1.4 1997/02/03 04:47:28 downsj Exp $ */
+/* $OpenBSD: grf_hy.c,v 1.5 1997/02/05 16:01:12 downsj Exp $ */
/* $NetBSD: grf_hy.c,v 1.8 1997/01/30 09:18:47 thorpej Exp $ */
/*
}
}
- grfdev_attach(sc, hy_init, grf, &hyper_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, hy_init, grf, &hyper_grfsw, &hyper_itesw);
+#else
+ grfdev_attach(sc, hy_init, grf, &hyper_grfsw, NULL);
+#endif /* NITE > 0 */
}
/*
-/* $OpenBSD: grf_rb.c,v 1.4 1997/02/03 04:47:30 downsj Exp $ */
+/* $OpenBSD: grf_rb.c,v 1.5 1997/02/05 16:01:14 downsj Exp $ */
/* $NetBSD: grf_rb.c,v 1.10 1997/01/30 09:18:48 thorpej Exp $ */
/*
grf = (caddr_t)IIOV(GRFIADDR);
sc->sc_scode = -1; /* XXX internal i/o */
- grfdev_attach(sc, rb_init, grf, &rbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, rb_init, grf, &rbox_grfsw, &rbox_itesw);
+#else
+ grfdev_attach(sc, rb_init, grf, &rbox_grfsw, NULL);
+#endif /* NITE > 0 */
}
int
}
}
- grfdev_attach(sc, rb_init, grf, &rbox_grfsw);
+#if NITE > 0
+ grfdev_attach(sc, rb_init, grf, &rbox_grfsw, &rbox_itesw);
+#else
+ grfdev_attach(sc, rb_init, grf, &rbox_grfsw, NULL);
+#endif /* NITE > 0 */
}
/*
-/* $OpenBSD: grf_subr.c,v 1.3 1997/02/04 07:15:26 downsj Exp $ */
+/* $OpenBSD: grf_subr.c,v 1.4 1997/02/05 16:01:15 downsj Exp $ */
/* $NetBSD: grf_subr.c,v 1.3 1997/01/31 21:16:50 carrel Exp $ */
/*-
#include <hp300/dev/grfioctl.h>
#include <hp300/dev/grfvar.h>
+#include <hp300/dev/itevar.h>
+
int grfdevprint __P((void *, const char *));
void
-grfdev_attach(sc, init, regs, sw)
+grfdev_attach(sc, init, regs, sw, isw)
struct grfdev_softc *sc;
int (*init) __P((struct grf_data *, int, caddr_t));
caddr_t regs;
struct grfsw *sw;
+ struct itesw *isw;
{
struct grfdev_attach_args ga;
struct grf_data *gp;
ga.ga_scode = sc->sc_scode; /* XXX */
ga.ga_isconsole = isconsole;
ga.ga_data = (void *)sc->sc_data;
+ ga.ga_ite = (void *)isw;
(void)config_found(&sc->sc_dev, &ga, grfdevprint);
}
-/* $OpenBSD: grf_tc.c,v 1.4 1997/02/03 04:47:31 downsj Exp $ */
+/* $OpenBSD: grf_tc.c,v 1.5 1997/02/05 16:01:16 downsj Exp $ */
/* $NetBSD: grf_tc.c,v 1.10 1997/01/30 09:18:50 thorpej Exp $ */
/*
panic("topcat_common_attach");
}
- grfdev_attach(sc, tc_init, grf, sw);
+#if NITE > 0
+ grfdev_attach(sc, tc_init, grf, sw, &topcat_itesw);
+#else
+ grfdev_attach(sc, tc_init, grf, sw, NULL);
+#endif /* NITE > 0 */
}
/*
-/* $OpenBSD: grfvar.h,v 1.4 1997/02/03 04:47:32 downsj Exp $ */
+/* $OpenBSD: grfvar.h,v 1.5 1997/02/05 16:01:17 downsj Exp $ */
/* $NetBSD: grfvar.h,v 1.9 1997/01/30 09:18:51 thorpej Exp $ */
/*
int ga_scode; /* XXX select code, -1 for intio */
int ga_isconsole; /* from hardware; is console? */
void *ga_data; /* hardware-dependent data */
+ void *ga_ite; /* ITE switch table */
};
/* flags */
#ifdef _KERNEL
extern struct grf_data grf_cn; /* grf_data for console device */
+struct itesw;
void grfdev_attach __P((struct grfdev_softc *,
int (*init)(struct grf_data *, int, caddr_t),
- caddr_t, struct grfsw *));
+ caddr_t, struct grfsw *, struct itesw *itesw));
#endif /* _KERNEL */
-/* $OpenBSD: ite.c,v 1.8 1997/02/04 06:21:26 downsj Exp $ */
+/* $OpenBSD: ite.c,v 1.9 1997/02/05 16:01:19 downsj Exp $ */
/* $NetBSD: ite.c,v 1.37 1997/02/02 09:40:31 thorpej Exp $ */
/*
return;
}
bzero(ite->sc_data, sizeof(struct ite_data));
+ ite->sc_data->isw = (struct itesw *)ga->ga_ite;
+ ite->sc_data->grf = (struct grf_data *)ga->ga_data;
ite->sc_data->flags = ITE_ALIVE;
}