Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arc/dev bus_dma implementation for jazz dma tlb,



details:   https://anonhg.NetBSD.org/src/rev/4fc660d29c8e
branches:  trunk
changeset: 487550:4fc660d29c8e
user:      soda <soda%NetBSD.org@localhost>
date:      Fri Jun 09 05:28:47 2000 +0000

description:
bus_dma implementation for jazz dma tlb,
contributed by Shuichiro URATA <ur%a-r.org@localhost>

diffstat:

 sys/arch/arc/dev/asc.c   |   3 ++-
 sys/arch/arc/dev/fd.c    |   3 ++-
 sys/arch/arc/dev/if_sn.c |  15 ++++++++-------
 3 files changed, 12 insertions(+), 9 deletions(-)

diffs (98 lines):

diff -r 2c9c5ec74dce -r 4fc660d29c8e sys/arch/arc/dev/asc.c
--- a/sys/arch/arc/dev/asc.c    Fri Jun 09 05:27:40 2000 +0000
+++ b/sys/arch/arc/dev/asc.c    Fri Jun 09 05:28:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc.c,v 1.21 2000/02/22 11:25:59 soda Exp $    */
+/*     $NetBSD: asc.c,v 1.22 2000/06/09 05:28:47 soda Exp $    */
 /*     $OpenBSD: asc.c,v 1.9 1998/03/16 09:38:39 pefo Exp $    */
 /*     NetBSD: asc.c,v 1.10 1994/12/05 19:11:12 dean Exp       */
 
@@ -140,6 +140,7 @@
 #include <machine/autoconf.h>
 #include <machine/bus.h>
 
+#include <arc/jazz/jazzdmatlbreg.h>
 #include <arc/dev/dma.h>
 #include <arc/dev/scsi.h>
 #include <arc/dev/ascreg.h>
diff -r 2c9c5ec74dce -r 4fc660d29c8e sys/arch/arc/dev/fd.c
--- a/sys/arch/arc/dev/fd.c     Fri Jun 09 05:27:40 2000 +0000
+++ b/sys/arch/arc/dev/fd.c     Fri Jun 09 05:28:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fd.c,v 1.21 2000/05/16 05:45:45 thorpej Exp $  */
+/*     $NetBSD: fd.c,v 1.22 2000/06/09 05:28:47 soda Exp $     */
 /*     $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $  */
 /*     NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp     */
 
@@ -100,6 +100,7 @@
 
 #include <mips/locore.h> /* for mips3_HitFlushDCache() */
 #include <arc/dev/fdreg.h>
+#include <arc/jazz/jazzdmatlbreg.h>
 #include <arc/dev/dma.h>
 
 #include "locators.h"
diff -r 2c9c5ec74dce -r 4fc660d29c8e sys/arch/arc/dev/if_sn.c
--- a/sys/arch/arc/dev/if_sn.c  Fri Jun 09 05:27:40 2000 +0000
+++ b/sys/arch/arc/dev/if_sn.c  Fri Jun 09 05:28:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sn.c,v 1.17 2000/02/25 13:28:42 soda Exp $  */
+/*     $NetBSD: if_sn.c,v 1.18 2000/06/09 05:28:48 soda Exp $  */
 /*     $OpenBSD: if_sn.c,v 1.12 1999/05/13 15:44:48 jason Exp $        */
 
 /*
@@ -66,6 +66,7 @@
 
 #include <mips/locore.h> /* for mips3_HitFlushDCache() */
 
+#include <arc/jazz/jazzdmatlbreg.h>
 #include <arc/dev/dma.h>
 
 #define SONICDW 32
@@ -276,8 +277,8 @@
 
        sc->dma = &sc->__dma;
        sn_dma_init(sc->dma, FRAGMAX * NTDA
-                          + (NRBA * RBASIZE / R4030_DMA_PAGE_SIZE) + 1
-                          + (DESC_SIZE * 2 / R4030_DMA_PAGE_SIZE) + 1);
+                          + (NRBA * RBASIZE / JAZZ_DMA_PAGE_SIZE) + 1
+                          + (DESC_SIZE * 2 / JAZZ_DMA_PAGE_SIZE) + 1);
 
 /*
  * because the sonic is basicly 16bit device it 'concatenates'
@@ -285,7 +286,7 @@
  * around problems near the end of 64k !!
  */
        p = SONICBUF;
-       pp = SONICBUF - (FRAGMAX * NTDA * R4030_DMA_PAGE_SIZE);
+       pp = SONICBUF - (FRAGMAX * NTDA * JAZZ_DMA_PAGE_SIZE);
 
        if ((p ^ (p + TDASIZE)) & 0x10000)
                p = (p + 0x10000) & ~0xffff;
@@ -309,7 +310,7 @@
        v_cda = (struct CDA *)(p - pp + sc->dma->dma_va);
        p += CDASIZE;
 
-       p += R4030_DMA_PAGE_SIZE - (p & (R4030_DMA_PAGE_SIZE -1));
+       p += JAZZ_DMA_PAGE_SIZE - (p & (JAZZ_DMA_PAGE_SIZE -1));
        p_rba = (char *)p;
        v_rba = (char *)(p - pp + sc->dma->dma_va);
        p += NRBA * RBASIZE;
@@ -645,7 +646,7 @@
        mtdnext->mtd_mbuf = m0;
        txp = mtdnext->mtd_txp;
        SWR(txp->config, 0);
-       fragoffset = (txp - p_tda) * FRAGMAX * R4030_DMA_PAGE_SIZE;
+       fragoffset = (txp - p_tda) * FRAGMAX * JAZZ_DMA_PAGE_SIZE;
 
        /*
         * Now fill in the fragments. Each fragment maps to it's
@@ -681,7 +682,7 @@
                        fr++;
                        va += n;
                        resid -= n;
-                       fragoffset += R4030_DMA_PAGE_SIZE;
+                       fragoffset += JAZZ_DMA_PAGE_SIZE;
                }
        }
        /*



Home | Main Index | Thread Index | Old Index