Recognize the Sigma Designs ColorMax card, and handle the interrupt. Code

provided by Brian Foley <bfoley@gpo.iol.ie> via Allen Briggs, updated for
bus.h by me.
This commit is contained in:
scottr 1997-08-14 06:16:46 +00:00
parent 0bba8ce38d
commit f9904b191f
4 changed files with 48 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_mv.c,v 1.31 1997/08/11 22:53:31 scottr Exp $ */
/* $NetBSD: grf_mv.c,v 1.32 1997/08/14 06:16:46 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -58,6 +58,7 @@ static void grfmv_intr_radius __P((void *vsc, int slot));
static void grfmv_intr_cti __P((void *vsc, int slot));
static void grfmv_intr_cb264 __P((void *vsc, int slot));
static void grfmv_intr_cb364 __P((void *vsc, int slot));
static void grfmv_intr_cmax __P((void *vsc, int slot));
static int grfmv_mode __P((struct grf_softc *gp, int cmd, void *arg));
static caddr_t grfmv_phys __P((struct grf_softc *gp));
@ -237,6 +238,9 @@ bad:
sc->cli_value = 0;
add_nubus_intr(na->slot, grfmv_intr_generic_1, sc);
break;
case NUBUS_DRHW_COLORMAX:
add_nubus_intr(na->slot, grfmv_intr_cmax, sc);
break;
case NUBUS_DRHW_SE30:
/* Do nothing--SE/30 interrupts are disabled */
break;
@ -531,3 +535,19 @@ grfmv_intr_cb364(vsc, slot)
_cb364_intr_quit:
" : : "g" (slotbase) : "a0","d0","d1","d2");
}
/*
* Routine to clear interrupts for the Sigma Designs ColorMax card.
*/
/*ARGSUSED*/
static void
grfmv_intr_cmax(vsc, slot)
void *vsc;
int slot;
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int32_t dummy;
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.h,v 1.28 1997/07/15 15:45:38 scottr Exp $ */
/* $NetBSD: nubus.h,v 1.29 1997/08/14 06:16:49 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -53,7 +53,8 @@
#define NUBUS_DRSW_APPLE 0x0001
#define NUBUS_DRHW_TFB 0x0001 /* Apple Toby Frame Buffer */
#define NUBUS_DRHW_WVC 0x0006 /* Apple Workstation Video Card */
#define NUBUS_DRHW_SE30 0x0009
#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_PVC 0x0017 /* Apple Mac II Portrait Video Card */
#define NUBUS_DRHW_MDC 0x0019 /* Apple Macintosh Display Card */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_nubus.c,v 1.31 1997/08/11 22:53:31 scottr Exp $ */
/* $NetBSD: grf_nubus.c,v 1.32 1997/08/14 06:16:46 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -58,6 +58,7 @@ static void grfmv_intr_radius __P((void *vsc, int slot));
static void grfmv_intr_cti __P((void *vsc, int slot));
static void grfmv_intr_cb264 __P((void *vsc, int slot));
static void grfmv_intr_cb364 __P((void *vsc, int slot));
static void grfmv_intr_cmax __P((void *vsc, int slot));
static int grfmv_mode __P((struct grf_softc *gp, int cmd, void *arg));
static caddr_t grfmv_phys __P((struct grf_softc *gp));
@ -237,6 +238,9 @@ bad:
sc->cli_value = 0;
add_nubus_intr(na->slot, grfmv_intr_generic_1, sc);
break;
case NUBUS_DRHW_COLORMAX:
add_nubus_intr(na->slot, grfmv_intr_cmax, sc);
break;
case NUBUS_DRHW_SE30:
/* Do nothing--SE/30 interrupts are disabled */
break;
@ -531,3 +535,19 @@ grfmv_intr_cb364(vsc, slot)
_cb364_intr_quit:
" : : "g" (slotbase) : "a0","d0","d1","d2");
}
/*
* Routine to clear interrupts for the Sigma Designs ColorMax card.
*/
/*ARGSUSED*/
static void
grfmv_intr_cmax(vsc, slot)
void *vsc;
int slot;
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int32_t dummy;
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: nubus.h,v 1.28 1997/07/15 15:45:38 scottr Exp $ */
/* $NetBSD: nubus.h,v 1.29 1997/08/14 06:16:49 scottr Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -53,7 +53,8 @@
#define NUBUS_DRSW_APPLE 0x0001
#define NUBUS_DRHW_TFB 0x0001 /* Apple Toby Frame Buffer */
#define NUBUS_DRHW_WVC 0x0006 /* Apple Workstation Video Card */
#define NUBUS_DRHW_SE30 0x0009
#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_PVC 0x0017 /* Apple Mac II Portrait Video Card */
#define NUBUS_DRHW_MDC 0x0019 /* Apple Macintosh Display Card */