Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev minor cleanups.



details:   https://anonhg.NetBSD.org/src/rev/9eb6cf8ca621
branches:  trunk
changeset: 510087:9eb6cf8ca621
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri May 18 22:01:19 2001 +0000

description:
minor cleanups.

diffstat:

 sys/arch/sparc64/dev/psycho.c |  21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diffs (77 lines):

diff -r 024cbdcf6379 -r 9eb6cf8ca621 sys/arch/sparc64/dev/psycho.c
--- a/sys/arch/sparc64/dev/psycho.c     Fri May 18 21:53:26 2001 +0000
+++ b/sys/arch/sparc64/dev/psycho.c     Fri May 18 22:01:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psycho.c,v 1.32 2001/03/21 01:33:47 mrg Exp $  */
+/*     $NetBSD: psycho.c,v 1.33 2001/05/18 22:01:19 mrg Exp $  */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -186,10 +186,6 @@
        sc->sc_dmatag = ma->ma_dmatag;
 
        /*
-        * pull in all the information about the psycho as we can.
-        */
-
-       /*
         * call the model-specific initialisation routine.
         */
        if (strcmp(model, ROM_SABRE_MODEL) == 0)
@@ -226,8 +222,8 @@
  * SUNW,sabre initialisation ..
  *     - get the sabre's ranges.  this are used for both simba's.
  *     - find the two SUNW,simba's underneath (a and b)
- *     - work out which simba is which via the bus-range property
- *     - get each simba's interrupt-map and interrupt-map-mask.
+ *     - work out which simba is which via the PCI function
+ *     - get each simba's interrupt-map and interrupt-map-mask
  *     - turn on the iommu
  */
 static void
@@ -293,7 +289,7 @@
        sc->sc_simba_b->pp_nrange = sc->sc_simba_a->pp_nrange =
            sc->sc_sabre->pp_nrange;
 
-       /* get the bus-range for the sabre.  we expect 0..2 */
+       /* get the bus-range for the sabre.  */
        psycho_get_bus_range(sc->sc_node, sabre_br);
 
        pba->pba_bus = sabre_br[0];
@@ -313,6 +309,7 @@
                if (strcmp(model, ROM_SIMBA_MODEL) != 0)
                        continue;
 
+               /* grab the simba bus range and registers */
                psycho_get_bus_range(node, simba_br);
                psycho_get_registers(node, &regs, &nregs);
 
@@ -321,25 +318,23 @@
                case 0:
                        pp = sc->sc_simba_a;
                        who = 'a';
-                       pp->pp_regs = regs;
-                       pp->pp_nregs = nregs;
                        break;
                case 1:
                        pp = sc->sc_simba_b;
                        who = 'b';
-                       pp->pp_regs = regs;
-                       pp->pp_nregs = nregs;
                        break;
                default:
                        panic("illegal simba funcion %d\n", fn);
                }
+               pp->pp_regs = regs;
+               pp->pp_nregs = nregs;
                pp->pp_pcictl = &sc->sc_regs->psy_pcictl[0];
                /* link us in .. */
                pp->pp_sc = sc;
                
                printf("; simba %c, PCI bus %d", who, simba_br[0]);
 
-               /* grab the simba registers, interrupt map and map mask */
+               /* grab the simba interrupt map and map mask */
                psycho_get_intmap(node, &pp->pp_intmap, &pp->pp_nintmap);
                psycho_get_intmapmask(node, &pp->pp_intmapmask);
 



Home | Main Index | Thread Index | Old Index