Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/alpha/mcbus Pull up 1.5 -> 1.6.



details:   https://anonhg.NetBSD.org/src/rev/91fb64f31d39
branches:  netbsd-1-4
changeset: 468315:91fb64f31d39
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Apr 16 23:31:02 1999 +0000

description:
Pull up 1.5 -> 1.6.

diffstat:

 sys/arch/alpha/mcbus/mcbus.c |  56 ++++++++++++++++++++++++++++++-------------
 1 files changed, 39 insertions(+), 17 deletions(-)

diffs (118 lines):

diff -r 02f8215cfd92 -r 91fb64f31d39 sys/arch/alpha/mcbus/mcbus.c
--- a/sys/arch/alpha/mcbus/mcbus.c      Fri Apr 16 23:29:02 1999 +0000
+++ b/sys/arch/alpha/mcbus/mcbus.c      Fri Apr 16 23:31:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcbus.c,v 1.4 1998/07/08 00:56:39 mjacob Exp $ */
+/* $NetBSD: mcbus.c,v 1.4.8.1 1999/04/16 23:31:02 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 by Matthew Jacob
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.4 1998/07/08 00:56:39 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.4.8.1 1999/04/16 23:31:02 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -75,9 +75,19 @@
        sizeof (mcbus_softc_t), mcbusmatch, mcbusattach
 };
 
+/*
+ * Tru64 UNIX (formerly Digital UNIX (formerly DEC OSF/1)) probes for MCPCIAs
+ * in the following order:
+ *
+ *     5, 4, 7, 6
+ *
+ * This is so that the built-in CD-ROM on the internal 53c810 is always
+ * dka500.  We probe them in the same order, for consistency.
+ */
+const int mcbus_mcpcia_probe_order[] = { 5, 4, 7, 6 };
+
 extern void mcpcia_config_cleanup __P((void));
 
-
 static int
 mcbusprint(aux, cp)
        void *aux;
@@ -133,11 +143,9 @@
                "(no bcache)", "1MB BCache", "2MB BCache", "4MB BCache",
                "??(4)??", "??(5)??", "??(6)??", "??(7)??"
        };
-       static const u_int8_t pci_mid_order[4] = { 5, 4, 7, 6 };
        struct mcbus_dev_attach_args ta;
        mcbus_softc_t *mbp = (mcbus_softc_t *)self;
-       u_int8_t mid;
-       int i;
+       int i, mid;
 
        printf("\n");
 
@@ -150,26 +158,35 @@
         * Find and "configure" memory.
         */
        ta.ma_name = mcbus_cd.cd_name;
-       ta.ma_gid = MCBUS_GID_FROM_INSTANCE(self->dv_unit);
+       /*
+        * XXX If we ever support more than one MCBUS, we'll
+        * XXX have to probe for them, and map them to unit
+        * XXX numbers.
+        */
+       ta.ma_gid = MCBUS_GID_FROM_INSTANCE(0);
        ta.ma_mid = 1;
        ta.ma_type = MCBUS_TYPE_MEM;
        mbp->mcbus_types[1] = MCBUS_TYPE_MEM;
-       config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+       (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
 
        /*
-        * Now find PCI busses. In keeping with Digital's ordering
-        * of things, we'll search in a specific MID order.
+        * Now find PCI busses.
         */
        for (i = 0; i < MCPCIA_PER_MCBUS; i++) {
-               mid = pci_mid_order[i];
+               mid = mcbus_mcpcia_probe_order[i];
                ta.ma_name = mcbus_cd.cd_name;
-               ta.ma_gid = MCBUS_GID_FROM_INSTANCE(self->dv_unit);
+               /*
+                * XXX If we ever support more than one MCBUS, we'll
+                * XXX have to probe for them, and map them to unit
+                * XXX numbers.
+                */
+               ta.ma_gid = MCBUS_GID_FROM_INSTANCE(0);
                ta.ma_mid = mid;
                ta.ma_type = MCBUS_TYPE_PCI;
                /*
-                * Attach any  children nodes (PCI busses).
+                * XXX MUST ACTUALLY PROBE FOR MCPCIA!
                 */
-               config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+               (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
        }
 
        /*
@@ -185,13 +202,18 @@
                printf("%s mid %d: %s %s\n", self->dv_xname,
                    mid, mcbus_node_type_str(MCBUS_TYPE_CPU),
                    bcs[mcbus_primary.mcbus_bcache & 0x7]);
-#if    0
+#if 0
                ta.ma_name = mcbus_cd.cd_name;
-               ta.ma_gid = MCBUS_GID_FROM_INSTANCE(self->dv_unit);
+               /*
+                * XXX If we ever support more than one MCBUS, we'll
+                * XXX have to probe for them, and map them to unit
+                * XXX numbers.
+                */
+               ta.ma_gid = MCBUS_GID_FROM_INSTANCE(0);
                ta.ma_mid = mid;
                ta.ma_type = MCBUS_TYPE_CPU;
                mbp->mcbus_types[mid] = MCBUS_TYPE_CPU;
-               config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
+               (void) config_found_sm(self, &ta, mcbusprint, mcbussubmatch);
 #endif
        }
 



Home | Main Index | Thread Index | Old Index