Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/sgimips * tweak CRIME and MACE interrupt ma...



details:   https://anonhg.NetBSD.org/src/rev/baaf87653ac4
branches:  trunk
changeset: 541145:baaf87653ac4
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Jan 02 15:08:18 2003 +0000

description:
* tweak CRIME and MACE interrupt masks for IP32 and add some verbosity
* recognize ahc scsi as a boot device

once again thanks to Chris Sekiya

diffstat:

 sys/arch/sgimips/sgimips/autoconf.c |  38 ++++++++++++++++++++++++++----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diffs (80 lines):

diff -r 3b31e364182b -r baaf87653ac4 sys/arch/sgimips/sgimips/autoconf.c
--- a/sys/arch/sgimips/sgimips/autoconf.c       Thu Jan 02 14:10:25 2003 +0000
+++ b/sys/arch/sgimips/sgimips/autoconf.c       Thu Jan 02 15:08:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.11 2002/09/27 02:24:22 thorpej Exp $    */
+/*     $NetBSD: autoconf.c,v 1.12 2003/01/02 15:08:18 pooka Exp $      */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -33,6 +33,7 @@
  */
 
 #include "opt_ddb.h"
+#include "opt_machtypes.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -49,6 +50,9 @@
 #include <dev/scsipi/scsipi_all.h>
 #include <dev/scsipi/scsiconf.h>
 
+#include <sgimips/dev/crimereg.h>
+#include <sgimips/dev/macereg.h>
+
 struct device  *booted_device = NULL;
 static struct device *booted_controller = NULL;
 static int     booted_slot, booted_unit, booted_partition;
@@ -76,6 +80,23 @@
        printf("biomask %02x netmask %02x ttymask %02x clockmask %02x\n",
            biomask >> 8, netmask >> 8, ttymask >> 8, clockmask >> 8);
 
+       if (mach_type == MACH_SGI_IP32) {
+          u_int64_t mask;
+
+           mask = *(volatile u_int64_t *)MIPS_PHYS_TO_KSEG1(MACE_ISA_INT_MASK);
+           aprint_debug("MACE_ISA_MASK was %llx\n", mask);
+           mask |= ((1UL << 20) | (1UL << 26));
+           *(volatile u_int64_t *)MIPS_PHYS_TO_KSEG1(MACE_ISA_INT_MASK) = mask;
+           *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(MACE_PCI_FLUSH_W) = 0xffffffff;
+           *(volatile u_int64_t *)MIPS_PHYS_TO_KSEG1(CRIME_INTMASK) = 0x300710ULL;
+
+           aprint_debug("CRM_MASK: %llx, MACEISA_MASK (%x) %llx\n", 
+             *(volatile u_int64_t *)MIPS_PHYS_TO_KSEG1(CRIME_INTMASK),
+             MACE_ISA_INT_MASK,
+             *(volatile u_int64_t *)MIPS_PHYS_TO_KSEG1(MACE_ISA_INT_MASK));
+
+       }
+
        _splnone();
 }
 
@@ -174,23 +195,18 @@
        }
 
        /*
-        * Check for WDC controller
-        */
-       if (scsiboot && strcmp(name, "wdsc") == 0) {
-               /* 
-                * XXX: this fails if the controllers were attached 
-                * in an order other than the ARCS-imposed order.
+        * Handle SCSI boot device definitions
+        * wdsc -- IP22/24
+        * ahc -- IP32
                 */
+       if ( (scsiboot && strcmp(name, "wdsc") == 0) ||
+            (scsiboot && strcmp(name, "ahc") == 0) ) {
                if (dev->dv_unit == booted_slot)
                        booted_controller = dev;
                return;
        }
 
        /*
-        * Other SCSI controllers ??
-        */
-
-       /*
         * If we found the boot controller, if check disk/tape/cdrom device
         * on that controller matches.
         */



Home | Main Index | Thread Index | Old Index