diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/bwtwo.c | 10 | ||||
-rw-r--r-- | sys/arch/sparc/dev/cgeight.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/cgfour.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/cgsix.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc/dev/cgtwo.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 24 | ||||
-rw-r--r-- | sys/arch/sparc/include/eeprom.h | 30 |
7 files changed, 32 insertions, 50 deletions
diff --git a/sys/arch/sparc/dev/bwtwo.c b/sys/arch/sparc/dev/bwtwo.c index 7fbfc83e439..918eec695ff 100644 --- a/sys/arch/sparc/dev/bwtwo.c +++ b/sys/arch/sparc/dev/bwtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwtwo.c,v 1.36 2010/05/15 15:28:09 miod Exp $ */ +/* $OpenBSD: bwtwo.c,v 1.37 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: bwtwo.c,v 1.33 1997/05/24 20:16:02 pk Exp $ */ /* @@ -253,21 +253,21 @@ obp_name: if (CPU_ISSUN4) { struct eeprom *eep = (struct eeprom *)eeprom_va; int constype = ISSET(sc->sc_sunfb.sf_flags, FB_PFOUR) ? - EE_CONS_P4OPT : EE_CONS_BW; + EED_CONS_P4 : EED_CONS_BW; /* * Assume this is the console if there's no eeprom info * to be found. */ - if (eep == NULL || eep->eeConsole == constype) + if (eep == NULL || eep->ee_diag.eed_console == constype) isconsole = 1; else /* * On sun4 systems without on-board framebuffers (such as - * the 4/3xx models), the PROM will accept the EE_CONS_BW + * the 4/3xx models), the PROM will accept the EED_CONS_BW * setting although the framebuffer is a P4. * Accept this setting as well. */ - if (eep->eeConsole == EE_CONS_BW) + if (eep->ee_diag.eed_console == EED_CONS_BW) isconsole = 1; } #endif diff --git a/sys/arch/sparc/dev/cgeight.c b/sys/arch/sparc/dev/cgeight.c index 12613bf0d79..621dc6b8c0b 100644 --- a/sys/arch/sparc/dev/cgeight.c +++ b/sys/arch/sparc/dev/cgeight.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgeight.c,v 1.29 2008/12/26 22:30:21 miod Exp $ */ +/* $OpenBSD: cgeight.c,v 1.30 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: cgeight.c,v 1.13 1997/05/24 20:16:04 pk Exp $ */ /* @@ -164,7 +164,7 @@ cgeightattach(struct device *parent, struct device *self, void *args) * Assume this is the console if there's no eeprom info * to be found. */ - if (eep == NULL || eep->eeConsole == EE_CONS_P4OPT) + if (eep == NULL || eep->ee_diag.eed_console == EED_CONS_P4) isconsole = 1; } diff --git a/sys/arch/sparc/dev/cgfour.c b/sys/arch/sparc/dev/cgfour.c index ae5afdcb314..b291eba5c02 100644 --- a/sys/arch/sparc/dev/cgfour.c +++ b/sys/arch/sparc/dev/cgfour.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgfour.c,v 1.28 2008/12/26 22:30:21 miod Exp $ */ +/* $OpenBSD: cgfour.c,v 1.29 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: cgfour.c,v 1.13 1997/05/24 20:16:06 pk Exp $ */ /* @@ -162,7 +162,7 @@ cgfourattach(struct device *parent, struct device *self, void *args) * Assume this is the console if there's no eeprom info * to be found. */ - if (eep == NULL || eep->eeConsole == EE_CONS_P4OPT) + if (eep == NULL || eep->ee_diag.eed_console == EED_CONS_P4) isconsole = 1; } diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c index b1f6849cc54..c38b4605ba5 100644 --- a/sys/arch/sparc/dev/cgsix.c +++ b/sys/arch/sparc/dev/cgsix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgsix.c,v 1.41 2009/09/05 14:09:35 miod Exp $ */ +/* $OpenBSD: cgsix.c,v 1.42 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */ /* @@ -243,12 +243,12 @@ cgsixattach(struct device *parent, struct device *self, void *args) if (CPU_ISSUN4) { struct eeprom *eep = (struct eeprom *)eeprom_va; int constype = ISSET(sc->sc_sunfb.sf_flags, FB_PFOUR) ? - EE_CONS_P4OPT : EE_CONS_COLOR; + EED_CONS_P4 : EED_CONS_COLOR; /* * Assume this is the console if there's no eeprom info * to be found. */ - if (eep == NULL || eep->eeConsole == constype) + if (eep == NULL || eep->ee_diag.eed_console == constype) isconsole = 1; } #endif diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c index b0ba025de3e..6e6c99dab09 100644 --- a/sys/arch/sparc/dev/cgtwo.c +++ b/sys/arch/sparc/dev/cgtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgtwo.c,v 1.37 2008/12/26 22:30:21 miod Exp $ */ +/* $OpenBSD: cgtwo.c,v 1.38 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: cgtwo.c,v 1.22 1997/05/24 20:16:12 pk Exp $ */ /* @@ -180,7 +180,7 @@ cgtwoattach(struct device *parent, struct device *self, void *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 = 1; } diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index 17f0b19cd34..db0fdc52d7d 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.50 2010/05/15 15:27:15 miod Exp $ */ +/* $OpenBSD: fb.c,v 1.51 2010/06/07 19:43:45 miod Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -207,23 +207,31 @@ fb_setsize(struct sunfb *sf, int def_depth, int def_width, int def_height, break; } } else if (eep != NULL) { - switch (eep->eeScreenSize) { - case EE_SCR_1152X900: + switch (eep->ee_diag.eed_scrsize) { + case EED_SCR_1152X900: sf->sf_width = 1152; sf->sf_height = 900; break; - case EE_SCR_1024X1024: + case EED_SCR_1024X1024: sf->sf_width = 1024; sf->sf_height = 1024; break; - case EE_SCR_1600X1280: + case EED_SCR_1600X1280: sf->sf_width = 1600; sf->sf_height = 1280; break; - case EE_SCR_1440X1440: + case EED_SCR_1440X1440: sf->sf_width = 1440; sf->sf_height = 1440; break; + case EED_SCR_640X480: + sf->sf_width = 640; + sf->sf_height = 480; + break; + case EED_SCR_1280X1024: + sf->sf_width = 1280; + sf->sf_height = 1024; + break; } } } @@ -329,8 +337,8 @@ fbwscons_init(struct sunfb *sf, int isconsole) struct eeprom *ep = (struct eeprom *)eeprom_va; if (ep != NULL) { - rows = (u_short)ep->eeTtyRows; - cols = (u_short)ep->eeTtyCols; + rows = (u_short)ep->ee_diag.eed_rowsize; + cols = (u_short)ep->ee_diag.eed_colsize; /* deal with broken nvram contents... */ if (rows <= 0) rows = 34; diff --git a/sys/arch/sparc/include/eeprom.h b/sys/arch/sparc/include/eeprom.h index 162f40bb4c4..42a0fc772ac 100644 --- a/sys/arch/sparc/include/eeprom.h +++ b/sys/arch/sparc/include/eeprom.h @@ -1,4 +1,4 @@ -/* $OpenBSD: eeprom.h,v 1.11 2007/04/10 17:47:54 miod Exp $ */ +/* $OpenBSD: eeprom.h,v 1.12 2010/06/07 19:43:49 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -98,7 +98,7 @@ struct eeprom { u_char eed_bootunit; /* 0x01c: unit number */ u_char eed_bootpart; /* 0x01d: partition number */ - char eed_kbdtype; /* 0x01f: non-Sun keyboard type - for OEM's */ + char eed_kbdtype; /* 0x01e: non-Sun keyboard type - for OEM's */ #define EED_KBD_SUN 0 /* one of the Sun keyboards */ char eed_console; /* 0x01f: console device */ @@ -357,30 +357,4 @@ struct eeprom { #ifdef _KERNEL extern char *eeprom_va; int eeprom_uio(struct uio *); - -/* - * Compatibility defines with NetBSD's eeprom.h. - * - * The goal here is to provide enough compatibility for kernel drivers to - * compile without changes; not to make userland utilities compile. Userland - * should use the native interface. - */ -#define EE_CONS_BW EED_CONS_BW -#define EE_CONS_TTYA EED_CONS_TTYA -#define EE_CONS_TTYB EED_CONS_TTYB -#define EE_CONS_COLOR EED_CONS_COLOR -#define EE_CONS_P4OPT EED_CONS_P4 - -#define EE_SCR_1152X900 EED_SCR_1152X900 -#define EE_SCR_1024X1024 EED_SCR_1024X1024 -#define EE_SCR_1600X1280 EED_SCR_1600X1280 -#define EE_SCR_1440X1440 EED_SCR_1440X1440 -#define EE_SCR_640X480 EED_SCR_640X480 -#define EE_SCR_1280X1024 EED_SCR_1280X1024 - -#define eeConsole ee_diag.eed_console -#define eeTtyRows ee_diag.eed_rowsize -#define eeTtyCols ee_diag.eed_colsize -#define eeScreenSize ee_diag.eed_scrsize - #endif /* _KERNEL */ |