summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-19 12:51:54 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-19 12:51:54 +0000
commit26cc0db1f3094e1ea37a1422fa6e4e80865e12e0 (patch)
tree456d3d0b3afbd1c169cc31fadc9dd18e92fde236 /sys/arch/sparc
parenta7a5a186672eb7551af3e7f9c8077ce66d124a9c (diff)
use new eeprom.h
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/cgtwo.c13
-rw-r--r--sys/arch/sparc/dev/fb.c42
2 files changed, 28 insertions, 27 deletions
diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c
index 87f1e0579ce..15c9ee2eaed 100644
--- a/sys/arch/sparc/dev/cgtwo.c
+++ b/sys/arch/sparc/dev/cgtwo.c
@@ -198,7 +198,7 @@ cgtwoattach(parent, self, args)
* Assume this is the console if there's no eeprom info
* to be found.
*/
- if (eep == NULL || eep->eeConsole == EE_CONS_COLOR)
+ if (eep == NULL || eep->ee_diag.eed_console == EED_CONS_COLOR)
isconsole = (fbconstty != NULL);
else
isconsole = 0;
@@ -212,8 +212,7 @@ cgtwoattach(parent, self, args)
if ((sc->sc_fb.fb_pixels = ca->ca_ra.ra_vaddr) == NULL && isconsole) {
/* this probably cannot happen, but what the heck */
sc->sc_fb.fb_pixels = mapiodev(sc->sc_phys + CG2_PIXMAP_OFF,
- CG2_PIXMAP_SIZE,
- ca->ca_bustype);
+ CG2_PIXMAP_SIZE, ca->ca_bustype);
}
#ifndef offsetof
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
@@ -221,13 +220,13 @@ cgtwoattach(parent, self, args)
sc->sc_reg = (volatile struct cg2statusreg *)
mapiodev((caddr_t)sc->sc_phys +
- CG2_ROPMEM_OFF + offsetof(struct cg2fb, status.reg),
- sizeof(struct cg2statusreg), ca->ca_bustype);
+ CG2_ROPMEM_OFF + offsetof(struct cg2fb, status.reg),
+ sizeof(struct cg2statusreg), ca->ca_bustype);
sc->sc_cmap = (volatile u_short *)
mapiodev((caddr_t)sc->sc_phys +
- CG2_ROPMEM_OFF + offsetof(struct cg2fb, redmap[0]),
- 3 * CG2_CMSIZE, ca->ca_bustype);
+ CG2_ROPMEM_OFF + offsetof(struct cg2fb, redmap[0]),
+ 3 * CG2_CMSIZE, ca->ca_bustype);
if (isconsole) {
printf(" (console)\n");
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c
index 2fdaa2d6dde..2b18cb85a1f 100644
--- a/sys/arch/sparc/dev/fb.c
+++ b/sys/arch/sparc/dev/fb.c
@@ -76,7 +76,8 @@ fb_attach(fb)
struct fbdevice *fb;
{
-if (devfb) panic("multiple /dev/fb declarers");
+ if (devfb)
+ panic("multiple /dev/fb declarers");
devfb = fb;
}
@@ -156,27 +157,31 @@ fb_setsize(fb, depth, def_width, def_height, node, bustype)
if (cputyp==CPU_SUN4) {
struct eeprom *eep = (struct eeprom *)eeprom_va;
if (eep != NULL) {
- switch (eep->eeScreenSize) {
- case EE_SCR_1152X900:
+ switch (eep->ee_diag.eed_scrsize) {
+ case EED_SCR_1152X900:
fb->fb_type.fb_width = 1152;
fb->fb_type.fb_height = 900;
break;
-
- case EE_SCR_1024X1024:
+ case EED_SCR_1024X1024:
fb->fb_type.fb_width = 1024;
fb->fb_type.fb_height = 1024;
break;
-
- case EE_SCR_1600X1280:
+ case EED_SCR_1600X1280:
fb->fb_type.fb_width = 1600;
fb->fb_type.fb_height = 1280;
break;
-
- case EE_SCR_1440X1440:
+ case EED_SCR_1440X1440:
fb->fb_type.fb_width = 1440;
fb->fb_type.fb_height = 1440;
break;
-
+ case EED_SCR_640X480:
+ fb->fb_type.fb_width = 640;
+ fb->fb_type.fb_height = 480;
+ break;
+ case EED_SCR_1280X1024:
+ fb->fb_type.fb_width = 1280;
+ fb->fb_type.fb_height = 1024;
+ break;
default:
/*
* XXX: Do nothing, I guess.
@@ -197,14 +202,12 @@ fb_setsize(fb, depth, def_width, def_height, node, bustype)
donesize:
fb->fb_linebytes = (fb->fb_type.fb_width * depth) / 8;
break;
-
case BUS_SBUS:
fb->fb_type.fb_width = getpropint(node, "width", 1152);
fb->fb_type.fb_height = getpropint(node, "height", 900);
fb->fb_linebytes = getpropint(node, "linebytes",
(fb->fb_type.fb_width * depth) / 8);
break;
-
default:
panic("fb_setsize: inappropriate bustype");
/* NOTREACHED */
@@ -269,25 +272,24 @@ fbrcons_init(fb)
rc->rc_maxcol = 80;
rc->rc_maxrow = 34;
} else {
- rc->rc_maxcol = eep->eeTtyCols;
- rc->rc_maxrow = eep->eeTtyRows;
+ rc->rc_maxcol = eep->ee_diag.eed_colsize;
+ rc->rc_maxrow = eep->ee_diag.eed_rowsize;
}
}
#endif /* SUN4 */
#if defined(SUN4C) || defined(SUN4M)
if (cputyp != CPU_SUN4) {
- rc->rc_maxcol =
- a2int(getpropstring(optionsnode, "screen-#columns"), 80);
- rc->rc_maxrow =
- a2int(getpropstring(optionsnode, "screen-#rows"), 34);
+ rc->rc_maxcol = a2int(getpropstring(optionsnode,
+ "screen-#columns"), 80);
+ rc->rc_maxrow = a2int(getpropstring(optionsnode,
+ "screen-#rows"), 34);
}
#endif /* SUN4C || SUN4M */
#endif /* RASTERCONS_FULLSCREEN || RASTERCONS_SMALLFONT */
#if !(defined(RASTERCONS_FULLSCREEN) || defined(RASTERCONS_SMALLFONT))
/* Determine addresses of prom emulator row and column */
- if (cputyp == CPU_SUN4 ||
- romgetcursoraddr(&rc->rc_row, &rc->rc_col))
+ if (cputyp == CPU_SUN4 || romgetcursoraddr(&rc->rc_row, &rc->rc_col))
#endif
rc->rc_row = rc->rc_col = NULL;