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 Turn on PCI MEM and DMA.



details:   https://anonhg.NetBSD.org/src/rev/1516166c4725
branches:  trunk
changeset: 487518:1516166c4725
user:      eeh <eeh%NetBSD.org@localhost>
date:      Thu Jun 08 23:03:17 2000 +0000

description:
Turn on PCI MEM and DMA.

diffstat:

 sys/arch/sparc64/dev/pci_machdep.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r e720a8750166 -r 1516166c4725 sys/arch/sparc64/dev/pci_machdep.c
--- a/sys/arch/sparc64/dev/pci_machdep.c        Thu Jun 08 23:03:13 2000 +0000
+++ b/sys/arch/sparc64/dev/pci_machdep.c        Thu Jun 08 23:03:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.8 2000/06/04 19:15:05 cgd Exp $      */
+/*     $NetBSD: pci_machdep.c,v 1.9 2000/06/08 23:03:17 eeh Exp $      */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -32,9 +32,6 @@
  * functions expected by the MI PCI code.
  */
 
-#undef DEBUG
-#define DEBUG
-
 #ifdef DEBUG
 #define SPDB_CONF      0x01
 #define SPDB_INTR      0x04
@@ -205,12 +202,16 @@
                        intr = (intr & ~PCI_INTERRUPT_LINE_MASK) |
                               (pp->pp_intmap[i].child_intr & PCI_INTERRUPT_LINE_MASK);
                        DPRINTF((SPDB_INTFIX|SPDB_INTMAP), ("\n\t    ; gonna write %x to intreg", intr));
-
                        pci_conf_write(pc, tag, PCI_INTERRUPT_REG, intr);
                        DPRINTF((SPDB_INTFIX|SPDB_INTMAP), ("\n\t    ; reread %x from intreg", intr));
                        break;
                }
 
+               /* enable mem & dma if not already */
+               pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
+                       PCI_COMMAND_MEM_ENABLE|PCI_COMMAND_MASTER_ENABLE);
+
+
                /* clean up */
                if (pr)
                        free(pr, M_DEVBUF);
@@ -374,7 +375,8 @@
         * UltraSPARC IIi PCI does not use PCI_INTERRUPT_REG, but we have
         * used this space for our own purposes...
         */
-       DPRINTF(SPDB_INTR, ("pci_intr_map: tag %lx; pin %d; line %d", (long)tag, pin, line));
+       DPRINTF(SPDB_INTR, ("pci_intr_map: tag %lx; pin %d; line %d", 
+               (long)tag, pin, line));
 #if 1
        if (line == 255) {
                *ihp = -1;



Home | Main Index | Thread Index | Old Index