Use flags instead of a bunch of booleans. Add a "use bwx" flag.

This commit is contained in:
thorpej 1998-05-12 19:07:21 +00:00
parent 0b64ea0879
commit 6172f5a0ac
2 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia.c,v 1.33 1998/05/11 23:56:16 thorpej Exp $ */ /* $NetBSD: cia.c,v 1.34 1998/05/12 19:07:21 thorpej Exp $ */
/* /*
* Copyright (c) 1995, 1996 Carnegie-Mellon University. * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.33 1998/05/11 23:56:16 thorpej Exp $"); __KERNEL_RCSID(0, "$NetBSD: cia.c,v 1.34 1998/05/12 19:07:21 thorpej Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -116,9 +116,7 @@ cia_init(ccp, mallocsafe)
* If revision is > 2 non-masked, assume Pyxis. (XXX iffy?) * If revision is > 2 non-masked, assume Pyxis. (XXX iffy?)
*/ */
if (ccp->cc_rev > 2) if (ccp->cc_rev > 2)
ccp->cc_ispyxis = 1; ccp->cc_flags |= CCF_ISPYXIS;
else
ccp->cc_ispyxis = 0;
ccp->cc_rev &= REV_MASK; ccp->cc_rev &= REV_MASK;
@ -161,7 +159,7 @@ ciaattach(parent, self, aux)
* If we're a Pyxis, print the revision number, otherwise * If we're a Pyxis, print the revision number, otherwise
* the revision number indicates ALCOR or ALCOR2. * the revision number indicates ALCOR or ALCOR2.
*/ */
if (ccp->cc_ispyxis) if (ccp->cc_flags & CCF_ISPYXIS)
printf(": DECchip 21174 Core Logic chipset, revision %d\n", printf(": DECchip 21174 Core Logic chipset, revision %d\n",
ccp->cc_rev); ccp->cc_rev);
else else

View File

@ -1,4 +1,4 @@
/* $NetBSD: ciavar.h,v 1.12 1998/05/11 23:56:16 thorpej Exp $ */ /* $NetBSD: ciavar.h,v 1.13 1998/05/12 19:07:21 thorpej Exp $ */
/* /*
* Copyright (c) 1995, 1996 Carnegie-Mellon University. * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -54,7 +54,10 @@ struct cia_config {
u_int32_t cc_rev; u_int32_t cc_rev;
u_int32_t cc_cnfg; u_int32_t cc_cnfg;
int cc_ispyxis; int cc_flags;
#define CCF_ISPYXIS 0x01 /* chip is a 21174 Pyxis */
#define CCF_USEBWX 0x02 /* use BWX when possible */
struct extent *cc_io_ex, *cc_d_mem_ex, *cc_s_mem_ex; struct extent *cc_io_ex, *cc_d_mem_ex, *cc_s_mem_ex;
int cc_mallocsafe; int cc_mallocsafe;