static void bwtwo_set_video_sun4(struct bwtwo_softc *sc, int enable) { if (sc->sc_fb.fb_flags & FB_PFOUR) { /* * This handles the overlay plane case, too. */ fb_pfour_set_video(&sc->sc_fb, enable); return; } if (enable) stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_VIDEO); else stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) & ~SYSEN_VIDEO); return; }
static int bwtwo_get_video_sun4(struct bwtwo_softc *sc) { if (sc->sc_fb.fb_flags & FB_PFOUR) { /* * This handles the overlay plane case, too. */ return (fb_pfour_get_video(&sc->sc_fb)); } else return ((lduba(AC_SYSENABLE, ASI_CONTROL) & SYSEN_VIDEO) != 0); }
/* * Enable the cache. * We need to clear out the valid bits first. */ void cache_enable() { register u_int i, lim, ls, ts; ls = cacheinfo.c_linesize; ts = cacheinfo.c_totalsize; for (i = AC_CACHETAGS, lim = i + ts; i < lim; i += ls) sta(i, ASI_CONTROL, 0); stba(AC_SYSENABLE, ASI_CONTROL, lduba(AC_SYSENABLE, ASI_CONTROL) | SYSEN_CACHE); cacheinfo.c_enabled = 1; printf("%d byte (%d/line) write-through %cw flush cache enabled\n", ts, ls, cacheinfo.c_hwflush ? 'h' : 's'); }