summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev/grf_rh.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 18:53:18 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-08-23 18:53:18 +0000
commit4480a114041b55db8e1866c53fcdc234e5314cde (patch)
tree56130a121a4199651dfb0a31465c6fb77ad090b0 /sys/arch/amiga/dev/grf_rh.c
parent52f16f85700c22cbcd144b996d4cf636eac43b6f (diff)
Merge to late July NetBSD, more to come...
Diffstat (limited to 'sys/arch/amiga/dev/grf_rh.c')
-rw-r--r--sys/arch/amiga/dev/grf_rh.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/arch/amiga/dev/grf_rh.c b/sys/arch/amiga/dev/grf_rh.c
index b24b5794a0d..0da8f9d2572 100644
--- a/sys/arch/amiga/dev/grf_rh.c
+++ b/sys/arch/amiga/dev/grf_rh.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: grf_rh.c,v 1.7 1996/05/29 10:15:10 niklas Exp $ */
-/* $NetBSD: grf_rh.c,v 1.17 1996/05/19 21:05:37 veego Exp $ */
+/* $OpenBSD: grf_rh.c,v 1.8 1996/08/23 18:52:46 niklas Exp $ */
+/* $NetBSD: grf_rh.c,v 1.17.4.1 1996/05/26 17:26:45 is Exp $ */
/*
* Copyright (c) 1994 Markus Wild
@@ -1414,7 +1414,7 @@ int rh_mon_max = sizeof (monitor_defs)/sizeof (monitor_defs[0]);
int rh_default_mon = 0;
int rh_default_gfx = 4;
-static struct MonDef *current_mon;
+static struct MonDef *current_mon; /* EVIL */
int rh_mode __P((struct grf_softc *, u_long, void *, u_long, int));
void grfrhattach __P((struct device *, struct device *, void *));
@@ -1494,12 +1494,6 @@ grfrhattach(pdp, dp, auxp)
(char *)&gp[1] - (char *)&gp->g_display);
} else {
gp->g_regkva = (volatile caddr_t)zap->va;
-
- gp->g_regkva[0x3c8]=0;
- gp->g_regkva[0x3c9]=30;
- gp->g_regkva[0x3c9]=30;
- gp->g_regkva[0x3c9]=00;
-
gp->g_fbkva = (volatile caddr_t)zap->va + LM_OFFSET;
gp->g_unit = GRF_RETINAIII_UNIT;
gp->g_mode = rh_mode;
@@ -2064,12 +2058,12 @@ rh_blank(gp, on)
struct grf_softc *gp;
int *on;
{
+ struct MonDef *md = (struct MonDef *)gp->g_data;
int r;
- r = RSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE);
- r &= 0xdf; /* set Bit 5 to 0 */
+ r = 0x01 | ((md->FLG & MDF_CLKDIV2)/ MDF_CLKDIV2 * 8);
- WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, r | (*on ? 0x00 : 0x20));
+ WSeq(gp->g_regkva, SEQ_ID_CLOCKING_MODE, *on ? r : 0x21);
return(0);
}