Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha - Use the CTB_TURBOSLOT_* macros from r...



details:   https://anonhg.NetBSD.org/src/rev/8acb555cd7c3
branches:  trunk
changeset: 471934:8acb555cd7c3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Apr 15 22:06:47 1999 +0000

description:
- Use the CTB_TURBOSLOT_* macros from rpb.h.
- Don't assume bus/slot == ISA display.  Instead, test for TYPE_ISA.
- Some cosmetic (whitespace, mostly) cleanup.

diffstat:

 sys/arch/alpha/alpha/dec_1000a.c      |  13 +++++++------
 sys/arch/alpha/alpha/dec_2100_a50.c   |  13 +++++++------
 sys/arch/alpha/alpha/dec_3000_300.c   |   9 +++++----
 sys/arch/alpha/alpha/dec_3000_500.c   |   9 +++++----
 sys/arch/alpha/alpha/dec_550.c        |  13 +++++++------
 sys/arch/alpha/alpha/dec_alphabook1.c |  13 +++++++------
 sys/arch/alpha/alpha/dec_axppci_33.c  |  13 +++++++------
 sys/arch/alpha/alpha/dec_eb164.c      |  13 +++++++------
 sys/arch/alpha/alpha/dec_eb64plus.c   |  13 +++++++------
 sys/arch/alpha/alpha/dec_eb66.c       |  13 +++++++------
 sys/arch/alpha/alpha/dec_kn20aa.c     |  13 +++++++------
 11 files changed, 73 insertions(+), 62 deletions(-)

diffs (truncated from 429 to 300 lines):

diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_1000a.c
--- a/sys/arch/alpha/alpha/dec_1000a.c  Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_1000a.c  Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.4 1999/02/13 02:41:40 thorpej Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.5 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.4 1999/02/13 02:41:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_1000a.c,v 1.5 1999/04/15 22:06:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -197,17 +197,18 @@
                }
 
        case 3:
-#if    NPCKBD > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(iot, memt);
                else
                        pci_display_console(iot, memt,
-                           pcichipset, (ctb->ctb_turboslot >> 8) & 0xff,
-                           ctb->ctb_turboslot & 0xff, 0);
+                           pcichipset, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot),
+                           CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0);
 #else
                panic("not configured to use display && keyboard console");
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_2100_a50.c
--- a/sys/arch/alpha/alpha/dec_2100_a50.c       Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_2100_a50.c       Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_2100_a50.c,v 1.40 1999/02/13 02:41:40 thorpej Exp $ */
+/* $NetBSD: dec_2100_a50.c,v 1.41 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -31,7 +31,7 @@
  */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.40 1999/02/13 02:41:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.41 1999/04/15 22:06:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -136,17 +136,18 @@
                }
 
        case 3:
-#if    NPCKBD  > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(&acp->ac_iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(&acp->ac_iot, &acp->ac_memt);
                else
                        pci_display_console(&acp->ac_iot, &acp->ac_memt,
-                           &acp->ac_pc, (ctb->ctb_turboslot >> 8) & 0xff,
-                           ctb->ctb_turboslot & 0xff, 0);
+                           &acp->ac_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot),
+                           CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0);
 #else
                panic("not configured to use display && keyboard console");
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_3000_300.c
--- a/sys/arch/alpha/alpha/dec_3000_300.c       Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_3000_300.c       Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3000_300.c,v 1.25 1999/03/28 13:48:40 drochner Exp $ */
+/* $NetBSD: dec_3000_300.c,v 1.26 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.25 1999/03/28 13:48:40 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.26 1999/04/15 22:06:47 thorpej Exp $");
 
 #include "opt_new_scc_driver.h"
 
@@ -102,8 +102,9 @@
        case CTB_GRAPHICS:
 #if NWSDISPLAY > 0
                /* display console ... */
-               if (zs_ioasic_lk201_cnattach(0x1a0000000, 0x00180000, 0)
-                   && tc_3000_300_fb_cnattach(ctb->ctb_turboslot)) {
+               if (zs_ioasic_lk201_cnattach(0x1a0000000, 0x00180000, 0) &&
+                   tc_3000_300_fb_cnattach(
+                    CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot))) {
                        break;
                }
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_3000_500.c
--- a/sys/arch/alpha/alpha/dec_3000_500.c       Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_3000_500.c       Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3000_500.c,v 1.24 1999/03/28 13:48:40 drochner Exp $ */
+/* $NetBSD: dec_3000_500.c,v 1.25 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.24 1999/03/28 13:48:40 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.25 1999/04/15 22:06:47 thorpej Exp $");
 
 #include "opt_new_scc_driver.h"
 
@@ -122,8 +122,9 @@
        case CTB_GRAPHICS:
 #if NWSDISPLAY > 0
                /* display console ... */
-               if (zs_ioasic_lk201_cnattach(0x1e0000000, 0x00180000, 0)
-                   && tc_3000_500_fb_cnattach(ctb->ctb_turboslot)) {
+               if (zs_ioasic_lk201_cnattach(0x1e0000000, 0x00180000, 0) &&
+                   tc_3000_500_fb_cnattach(
+                    CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot))) {
                        break;
                }
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_550.c
--- a/sys/arch/alpha/alpha/dec_550.c    Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_550.c    Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_550.c,v 1.3 1999/02/13 02:41:40 thorpej Exp $ */
+/* $NetBSD: dec_550.c,v 1.4 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_550.c,v 1.3 1999/02/13 02:41:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_550.c,v 1.4 1999/04/15 22:06:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,17 +125,18 @@
                }
 
        case 3:
-#if    NPCKBD > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(&ccp->cc_iot, &ccp->cc_memt);
                else
                        pci_display_console(&ccp->cc_iot, &ccp->cc_memt,
-                           &ccp->cc_pc, (ctb->ctb_turboslot >> 8) & 0xff,
-                           ctb->ctb_turboslot & 0xff, 0);
+                           &ccp->cc_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot),
+                           CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0);
 #else
                panic("not configured to use display && keyboard console");
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_alphabook1.c
--- a/sys/arch/alpha/alpha/dec_alphabook1.c     Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_alphabook1.c     Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_alphabook1.c,v 1.2 1999/02/13 02:41:40 thorpej Exp $ */
+/* $NetBSD: dec_alphabook1.c,v 1.3 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -31,7 +31,7 @@
  */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_alphabook1.c,v 1.2 1999/02/13 02:41:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_alphabook1.c,v 1.3 1999/04/15 22:06:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,17 +127,18 @@
                }
 
        case 3:
-#if    NPCKBD  > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(&lcp->lc_iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(&lcp->lc_iot, &lcp->lc_memt);
                else
                        pci_display_console(&lcp->lc_iot, &lcp->lc_memt,
-                           &lcp->lc_pc, (ctb->ctb_turboslot >> 8) & 0xff,
-                           ctb->ctb_turboslot & 0xff, 0);
+                           &lcp->lc_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot),
+                           CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0);
 #else
                panic("not configured to use display && keyboard console");
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_axppci_33.c
--- a/sys/arch/alpha/alpha/dec_axppci_33.c      Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_axppci_33.c      Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_axppci_33.c,v 1.41 1999/02/13 02:41:40 thorpej Exp $ */
+/* $NetBSD: dec_axppci_33.c,v 1.42 1999/04/15 22:06:47 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -31,7 +31,7 @@
  */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.41 1999/02/13 02:41:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.42 1999/04/15 22:06:47 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,17 +171,18 @@
                }
 
        case 3:
-#if    NPCKBD  > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(&lcp->lc_iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(&lcp->lc_iot, &lcp->lc_memt);
                else
                        pci_display_console(&lcp->lc_iot, &lcp->lc_memt,
-                           &lcp->lc_pc, (ctb->ctb_turboslot >> 8) & 0xff,
-                           ctb->ctb_turboslot & 0xff, 0);
+                           &lcp->lc_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot),
+                           CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0);
 #else
                panic("not configured to use display && keyboard console");
 #endif
diff -r e0898d9f51d7 -r 8acb555cd7c3 sys/arch/alpha/alpha/dec_eb164.c
--- a/sys/arch/alpha/alpha/dec_eb164.c  Thu Apr 15 21:21:25 1999 +0000
+++ b/sys/arch/alpha/alpha/dec_eb164.c  Thu Apr 15 22:06:47 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_eb164.c,v 1.28 1999/02/16 07:25:43 veego Exp $ */
+/* $NetBSD: dec_eb164.c,v 1.29 1999/04/15 22:06:48 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.28 1999/02/16 07:25:43 veego Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.29 1999/04/15 22:06:48 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -120,17 +120,18 @@
                }
 
        case 3:
-#if    NPCKBD > 0
+#if NPCKBD > 0
                /* display console ... */
                /* XXX */
                (void) pckbc_cnattach(&ccp->cc_iot, PCKBC_KBD_SLOT);
 
-               if ((ctb->ctb_turboslot & 0xffff) == 0)
+               if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
+                   CTB_TURBOSLOT_TYPE_ISA)
                        isa_display_console(&ccp->cc_iot, &ccp->cc_memt);
                else
                        pci_display_console(&ccp->cc_iot, &ccp->cc_memt,
-                           &ccp->cc_pc, (ctb->ctb_turboslot >> 8) & 0xff,



Home | Main Index | Thread Index | Old Index