Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci use BUS_SPACE_MAP_PREFETCHABLE instead BUS_SPACE...



details:   https://anonhg.NetBSD.org/src/rev/a03eef97f4e8
branches:  trunk
changeset: 481309:a03eef97f4e8
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Jan 25 22:30:04 2000 +0000

description:
use BUS_SPACE_MAP_PREFETCHABLE instead BUS_SPACE_MAP_CACHEABLE where the
PCI BAR bit is referred to

diffstat:

 sys/dev/pci/pci_map.c  |   6 +++---
 sys/dev/pci/pci_subr.c |  12 ++++++------
 sys/dev/pci/pcireg.h   |   8 ++++----
 sys/dev/pci/tga.c      |   8 ++++----
 4 files changed, 17 insertions(+), 17 deletions(-)

diffs (100 lines):

diff -r 8f3495eb03a1 -r a03eef97f4e8 sys/dev/pci/pci_map.c
--- a/sys/dev/pci/pci_map.c     Tue Jan 25 22:26:49 2000 +0000
+++ b/sys/dev/pci/pci_map.c     Tue Jan 25 22:30:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_map.c,v 1.5 1998/08/15 10:10:54 mycroft Exp $      */
+/*     $NetBSD: pci_map.c,v 1.6 2000/01/25 22:30:04 drochner Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -171,8 +171,8 @@
        if (sizep != 0)
                *sizep = PCI_MAPREG_MEM_SIZE(mask);
        if (flagsp != 0)
-               *flagsp = PCI_MAPREG_MEM_CACHEABLE(address) ?
-                   BUS_SPACE_MAP_CACHEABLE : 0;
+               *flagsp = PCI_MAPREG_MEM_PREFETCHABLE(address) ?
+                   BUS_SPACE_MAP_PREFETCHABLE : 0;
 
        return (0);
 }
diff -r 8f3495eb03a1 -r a03eef97f4e8 sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c    Tue Jan 25 22:26:49 2000 +0000
+++ b/sys/dev/pci/pci_subr.c    Tue Jan 25 22:30:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_subr.c,v 1.33 1999/12/15 12:27:26 kleink Exp $     */
+/*     $NetBSD: pci_subr.c,v 1.34 2000/01/25 22:30:04 drochner Exp $   */
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -578,7 +578,7 @@
        }
        printf("type: ");
        if (PCI_MAPREG_TYPE(rval) == PCI_MAPREG_TYPE_MEM) {
-               const char *type, *cache;
+               const char *type, *prefetch;
 
                switch (PCI_MAPREG_MEM_TYPE(rval)) {
                case PCI_MAPREG_MEM_TYPE_32BIT:
@@ -594,11 +594,11 @@
                        type = "unknown (XXX)";
                        break;
                }
-               if (PCI_MAPREG_MEM_CACHEABLE(rval))
-                       cache = "";
+               if (PCI_MAPREG_MEM_PREFETCHABLE(rval))
+                       prefetch = "";
                else
-                       cache = "non";
-               printf("%s %scacheable memory\n", type, cache);
+                       prefetch = "non";
+               printf("%s %sprefetchable memory\n", type, prefetch);
                printf("      base: 0x%08x, size: 0x%08x\n",
                    PCI_MAPREG_MEM_ADDR(rval),
                    PCI_MAPREG_MEM_SIZE(mask));
diff -r 8f3495eb03a1 -r a03eef97f4e8 sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h      Tue Jan 25 22:26:49 2000 +0000
+++ b/sys/dev/pci/pcireg.h      Tue Jan 25 22:30:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcireg.h,v 1.22 1999/11/16 02:13:02 enami Exp $        */
+/*     $NetBSD: pcireg.h,v 1.23 2000/01/25 22:30:05 drochner Exp $     */
 
 /*
  * Copyright (c) 1995, 1996, 1999
@@ -314,9 +314,9 @@
 #define        PCI_MAPREG_MEM_TYPE_32BIT_1M            0x00000002
 #define        PCI_MAPREG_MEM_TYPE_64BIT               0x00000004
 
-#define        PCI_MAPREG_MEM_CACHEABLE(mr)                                    \
-           (((mr) & PCI_MAPREG_MEM_CACHEABLE_MASK) != 0)
-#define        PCI_MAPREG_MEM_CACHEABLE_MASK           0x00000008
+#define        PCI_MAPREG_MEM_PREFETCHABLE(mr)                         \
+           (((mr) & PCI_MAPREG_MEM_PREFETCHABLE_MASK) != 0)
+#define        PCI_MAPREG_MEM_PREFETCHABLE_MASK        0x00000008
 
 #define        PCI_MAPREG_MEM_ADDR(mr)                                         \
            ((mr) & PCI_MAPREG_MEM_ADDR_MASK)
diff -r 8f3495eb03a1 -r a03eef97f4e8 sys/dev/pci/tga.c
--- a/sys/dev/pci/tga.c Tue Jan 25 22:26:49 2000 +0000
+++ b/sys/dev/pci/tga.c Tue Jan 25 22:30:04 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.15 1999/12/06 19:25:59 drochner Exp $ */
+/* $NetBSD: tga.c,v 1.16 2000/01/25 22:30:05 drochner Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -168,11 +168,11 @@
            PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT,
            &dc->dc_pcipaddr, &pcisize, &flags))
                return;
-       if ((flags & BUS_SPACE_MAP_CACHEABLE) == 0)             /* XXX */
-               panic("tga memory not cacheable");
+       if ((flags & BUS_SPACE_MAP_PREFETCHABLE) == 0)          /* XXX */
+               panic("tga memory not prefetchable");
 
        if (bus_space_map(memt, dc->dc_pcipaddr, pcisize,
-           BUS_SPACE_MAP_CACHEABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_vaddr))
+           BUS_SPACE_MAP_PREFETCHABLE | BUS_SPACE_MAP_LINEAR, &dc->dc_vaddr))
                return;
 #ifdef __alpha__
        dc->dc_paddr = ALPHA_K0SEG_TO_PHYS(dc->dc_vaddr);       /* XXX */



Home | Main Index | Thread Index | Old Index