summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2007-01-12 13:52:08 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2007-01-12 13:52:08 +0000
commit0f442b06b2ec8b9eae2e8bae64744f1e76d459d0 (patch)
tree581d040f04519d990e1a81e8326e5812f6ea6c10 /sys/arch
parent4e522f10c804eca8dcccd764198ce88b31ac003a (diff)
support a few more video cards, untested:
Formac Baers/ProNitron 80.IVb Apple Mac II Monochrome Video Card VillageTronic Mac Picasso 340 Relax 19" Model 200 prodded by miod@ from NetBSD
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mac68k/dev/grf_mv.c64
-rw-r--r--sys/arch/mac68k/dev/nubus.h5
2 files changed, 66 insertions, 3 deletions
diff --git a/sys/arch/mac68k/dev/grf_mv.c b/sys/arch/mac68k/dev/grf_mv.c
index d9c289f1bc4..4f76744acdd 100644
--- a/sys/arch/mac68k/dev/grf_mv.c
+++ b/sys/arch/mac68k/dev/grf_mv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf_mv.c,v 1.32 2006/02/26 22:23:15 martin Exp $ */
+/* $OpenBSD: grf_mv.c,v 1.33 2007/01/12 13:52:07 martin Exp $ */
/* $NetBSD: grf_nubus.c,v 1.62 2001/01/22 20:27:02 briggs Exp $ */
/*
@@ -75,6 +75,9 @@ int grfmv_intr_vimage(void *vsc);
int grfmv_intr_gvimage(void *vsc);
int grfmv_intr_radius_gsc(void *vsc);
int grfmv_intr_radius_gx(void *vsc);
+int grfmv_intr_relax_200(void *);
+int grfmv_intr_mvc(void *);
+int grfmv_intr_viltro_340(void *);
#define CARD_NAME_LEN 64
@@ -321,6 +324,11 @@ macfb_nubus_attach(struct device *parent, struct device *self, void *aux)
add_nubus_intr(na->slot, grfmv_intr_lapis, sc,
sc->sc_dev.dv_xname);
break;
+ case NUBUS_DRHW_RELAX200:
+ add_nubus_intr(na->slot, grfmv_intr_relax_200, sc,
+ sc->sc_dev.dv_xname);
+ break;
+ case NUBUS_DRHW_BAER:
case NUBUS_DRHW_FORMAC:
add_nubus_intr(na->slot, grfmv_intr_formac, sc,
sc->sc_dev.dv_xname);
@@ -360,6 +368,14 @@ macfb_nubus_attach(struct device *parent, struct device *self, void *aux)
add_nubus_intr(na->slot, grfmv_intr_generic_write4, sc,
sc->sc_dev.dv_xname);
break;
+ case NUBUS_DRHW_MVC:
+ add_nubus_intr(na->slot, grfmv_intr_mvc, sc,
+ sc->sc_dev.dv_xname);
+ break;
+ case NUBUS_DRHW_VILTRO340:
+ add_nubus_intr(na->slot, grfmv_intr_viltro_340, sc,
+ sc->sc_dev.dv_xname);
+ break;
default:
printf("%s: Unknown video card ID 0x%x\n",
sc->sc_dev.dv_xname, sc->card_id);
@@ -668,7 +684,8 @@ grfmv_intr_lapis(void *vsc)
}
/*
- * Routine to clear interrupts for the Formac Color Card II
+ * Routine to clear interrupts for the Formac ProNitron 80.IVb
+ * and Color Card II
*/
/*ARGSUSED*/
int
@@ -738,3 +755,46 @@ grfmv_intr_radius_gx(void *vsc)
bus_space_write_1(sc->sc_tag, sc->sc_regh, 0x600000, 0x20);
return (1);
}
+
+/*
+ * Routine to clear interrupts for the Relax 19" model 200.
+ */
+/*ARGSUSED*/
+int
+grfmv_intr_relax_200(void *vsc)
+{
+ struct macfb_softc *sc = (struct macfb_softc *)vsc;
+
+ /* The board ROM driver code has a tst.l here. */
+ bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
+ return (1);
+}
+
+/*
+ * Routine to clear interrupts for the Apple Mac II Monochrome Video Card.
+ */
+/*ARGSUSED*/
+int
+grfmv_intr_mvc(void *vsc)
+{
+ struct macfb_softc *sc = (struct macfb_softc *)vsc;
+
+ bus_space_write_4(sc->sc_tag, sc->sc_handle, 0x00040000, 0);
+ bus_space_write_4(sc->sc_tag, sc->sc_handle, 0x00020000, 0);
+ return (1);
+}
+
+/*
+ * Routine to clear interrupts for the VillageTronic Mac Picasso 340.
+ */
+/*ARGSUSED*/
+int
+grfmv_intr_viltro_340(void *vsc)
+{
+ struct macfb_softc *sc = (struct macfb_softc *)vsc;
+
+ /* Yes, two read accesses to the same spot. */
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
+ bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
+ return (1);
+}
diff --git a/sys/arch/mac68k/dev/nubus.h b/sys/arch/mac68k/dev/nubus.h
index eefdfa6255e..a0629105d71 100644
--- a/sys/arch/mac68k/dev/nubus.h
+++ b/sys/arch/mac68k/dev/nubus.h
@@ -55,17 +55,20 @@
#define NUBUS_TYPE_LCD 0x0002
#define NUBUS_DRSW_APPLE 0x0001
#define NUBUS_DRHW_TFB 0x0001 /* Apple Toby Frame Buffer */
-#define NUBUS_DRHW_BAER 0x0002 /* Formac Baers color card */
+#define NUBUS_DRHW_BAER 0x0002 /* Formac Baers/ProNitron 80.IVb */
#define NUBUS_DRHW_WVC 0x0006 /* Apple Workstation Video Card */
#define NUBUS_DRHW_COLORMAX 0x0007 /* Sigma Designs ColorMax */
#define NUBUS_DRHW_SE30 0x0009 /* Apple SE/30 pseudo-slot video */
#define NUBUS_DRHW_M2HRVC 0x0013 /* Apple Mac II High-Res Video Card */
+#define NUBUS_DRHW_MVC 0x0014 /* Apple Mac II Monochrome Video Card */
#define NUBUS_DRHW_PVC 0x0017 /* Apple Mac II Portrait Video Card */
#define NUBUS_DRHW_MDC 0x0019 /* Apple Macintosh Display Card */
#define NUBUS_DRHW_VSC 0x0020 /* Apple Macintosh Duo MiniDock */
#define NUBUS_DRHW_JET 0x0029 /* Apple Macintosh DuoDock II */
#define NUBUS_DRHW_BOOGIE 0x002b /* Apple Macintosh 24AC Video Card */
+#define NUBUS_DRHW_VILTRO340 0x0102 /* VillageTronic Mac Picasso 340 */
#define NUBUS_DRHW_SUPRGFX 0x0105 /* SuperMac GFX */
+#define NUBUS_DRHW_RELAX200 0x0131 /* Relax 19" Model 200 */
#define NUBUS_DRHW_FORMAC 0x013A /* Formac color card II */
#define NUBUS_DRHW_CB264 0x013B /* RasterOps ColorBoard 264 */
#define NUBUS_DRHW_MICRON 0x0146 /* Micron Exceed color */