Support for four nubus video cards:

Formac ProNitron 80.IVb (1024x768/8)
Relax 19" Model 200 (1024x768/8)
Apple Monochrome Video Card (640x480/1)
VillageTronic Mac Picasso 320 (up to 1920x1080/up to 24)

Nubus identifiers for Creative Solutions parallel & serial cards,
and a Becton Dickinson data acquisition card.
This commit is contained in:
hauke 2006-12-06 21:21:12 +00:00
parent dbc497f58c
commit 82e4e09423
2 changed files with 72 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_nubus.c,v 1.70 2005/12/24 20:07:15 perry Exp $ */
/* $NetBSD: grf_nubus.c,v 1.71 2006/12/06 21:21:12 hauke Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.70 2005/12/24 20:07:15 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.71 2006/12/06 21:21:12 hauke Exp $");
#include <sys/param.h>
@ -69,6 +69,9 @@ static void grfmv_intr_vimage(void *);
static void grfmv_intr_gvimage(void *);
static void grfmv_intr_radius_gsc(void *);
static void grfmv_intr_radius_gx(void *);
static void grfmv_intr_relax_200(void *);
static void grfmv_intr_mvc(void *);
static void grfmv_intr_viltro_340(void *);
static int grfmv_mode(struct grf_softc *, int, void *);
static int grfmv_match(struct device *, struct cfdata *, void *);
@ -301,6 +304,10 @@ bad:
case NUBUS_DRHW_LAPIS:
add_nubus_intr(na->slot, grfmv_intr_lapis, sc);
break;
case NUBUS_DRHW_RELAX200:
add_nubus_intr(na->slot, grfmv_intr_relax_200, sc);
break;
case NUBUS_DRHW_BAER:
case NUBUS_DRHW_FORMAC:
add_nubus_intr(na->slot, grfmv_intr_formac, sc);
break;
@ -332,6 +339,12 @@ bad:
sc->cli_value = 0;
add_nubus_intr(na->slot, grfmv_intr_generic_write4, sc);
break;
case NUBUS_DRHW_MVC:
add_nubus_intr(na->slot, grfmv_intr_mvc, sc);
break;
case NUBUS_DRHW_VILTRO340:
add_nubus_intr(na->slot, grfmv_intr_viltro_340, sc);
break;
default:
printf("%s: Unknown video card ID 0x%x --",
sc->sc_dev.dv_xname, sc->card_id);
@ -647,7 +660,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*/
static void
@ -712,3 +726,45 @@ grfmv_intr_radius_gx(void *vsc)
bus_space_write_1(sc->sc_tag, sc->sc_handle, 0x600000, 0x00);
bus_space_write_1(sc->sc_tag, sc->sc_handle, 0x600000, 0x20);
}
/*
* Routine to clear interrupts for the Relax 19" model 200.
*/
/*ARGSUSED*/
static void
grfmv_intr_relax_200(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
unsigned long scratch;
/* The board ROM driver code has a tst.l here. */
scratch = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
}
/*
* Routine to clear interrupts for the Apple Mac II Monochrome Video Card.
*/
/*ARGSUSED*/
static void
grfmv_intr_mvc(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_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);
}
/*
* Routine to clear interrupts for the VillageTronic Mac Picasso 340.
*/
/*ARGSUSED*/
static void
grfmv_intr_viltro_340(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t scratch;
/* Yes, two read accesses to the same spot. */
scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.h,v 1.61 2005/12/11 12:18:03 christos Exp $ */
/* $NetBSD: nubus.h,v 1.62 2006/12/06 21:21:12 hauke Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -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 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 */
@ -122,10 +125,16 @@
#define NUBUS_CATEGORY_COMMUNICATIONS 0x0006
#define NUBUS_TYPE_RS232 0x0002
#define NUBUS_TYPE_IEEE488 0x0004
#define NUBUS_TYPE_CENTRONICS 0x000B
#define NUBUS_TYPE_BECTDIC 0x002E
#define NUBUS_DRSW_BECTDIC 0x0100
#define NUBUS_DRSW_CPI 0x0100
#define NUBUS_DRSW_HDS 0x0102
#define NUBUS_DRSW_NI488 0x0104
#define NUBUS_DRHW_HDS 0x0102 /* Creative Solutions Hustler serial */
#define NUBUS_DRHW_NB_GPIB_TNT 0x0102 /* NatInst NB-GPIB/TNT */
#define NUBUS_DRHW_BECTDIC 0x0100 /* Becton Dickinson Acquisition Card */
#define NUBUS_DRHW_CPI 0x0100 /* Creative Solutions parallel */
#define NUBUS_DRHW_HDS 0x0102 /* Creative Solutions 2x serial */
#define NUBUS_DRHW_NBGPIBTNT 0x0102 /* National Instruments NB-GPIB/TNT */
#define NUBUS_CATEGORY_MEMORY 0x0009 /* Also KanjiTalk Font Card? */
#define NUBUS_TYPE_RAMCACHE 0x010C /* From Apple PDS card */