Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use iwin[3] instead of iwin[2] for RAM access and l...



details:   https://anonhg.NetBSD.org/src/rev/55bc1567f4b6
branches:  trunk
changeset: 542173:55bc1567f4b6
user:      briggs <briggs%NetBSD.org@localhost>
date:      Thu Jan 23 03:56:45 2003 +0000

description:
Use iwin[3] instead of iwin[2] for RAM access and leave iwin[2] unused.

diffstat:

 sys/arch/arm/xscale/i80321.c             |   8 ++++----
 sys/arch/evbarm/iq80321/i80321_mainbus.c |  23 +++++++++++++++--------
 2 files changed, 19 insertions(+), 12 deletions(-)

diffs (71 lines):

diff -r 8fb7e59a3ae8 -r 55bc1567f4b6 sys/arch/arm/xscale/i80321.c
--- a/sys/arch/arm/xscale/i80321.c      Thu Jan 23 03:53:16 2003 +0000
+++ b/sys/arch/arm/xscale/i80321.c      Thu Jan 23 03:56:45 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321.c,v 1.10 2003/01/23 03:53:16 briggs Exp $       */
+/*     $NetBSD: i80321.c,v 1.11 2003/01/23 03:56:45 briggs Exp $       */
 
 /*
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -290,9 +290,9 @@
        bus_dma_tag_t dmat = &sc->sc_pci_dmat;
        struct arm32_dma_range *dr = &sc->sc_pci_dma_range;
 
-       dr->dr_sysbase = sc->sc_iwin[2].iwin_xlate;
-       dr->dr_busbase = PCI_MAPREG_MEM_ADDR(sc->sc_iwin[2].iwin_base_lo);
-       dr->dr_len = sc->sc_iwin[2].iwin_size;
+       dr->dr_sysbase = sc->sc_iwin[3].iwin_xlate;
+       dr->dr_busbase = PCI_MAPREG_MEM_ADDR(sc->sc_iwin[3].iwin_base_lo);
+       dr->dr_len = sc->sc_iwin[3].iwin_size;
 
        dmat->_ranges = dr;
        dmat->_nranges = 1;
diff -r 8fb7e59a3ae8 -r 55bc1567f4b6 sys/arch/evbarm/iq80321/i80321_mainbus.c
--- a/sys/arch/evbarm/iq80321/i80321_mainbus.c  Thu Jan 23 03:53:16 2003 +0000
+++ b/sys/arch/evbarm/iq80321/i80321_mainbus.c  Thu Jan 23 03:56:45 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80321_mainbus.c,v 1.6 2002/10/03 01:29:30 thorpej Exp $       */
+/*     $NetBSD: i80321_mainbus.c,v 1.7 2003/01/23 03:56:45 briggs Exp $        */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -135,9 +135,9 @@
         *
         *      1       Reserve space for private devices
         *
-        *      2       RAM access
+        *      2       Unused.
         *
-        *      3       Unused.
+        *      3       RAM access
         *
         * This chunk needs to be customized for each IOP321 application.
         */
@@ -160,15 +160,22 @@
                panic("i80321: iwin[1] slave");
        }
 
+       sc->sc_iwin[2].iwin_base_lo = 0 |
+           PCI_MAPREG_MEM_PREFETCHABLE_MASK |
+           PCI_MAPREG_MEM_TYPE_64BIT;
+       sc->sc_iwin[2].iwin_base_hi = 0;
+       sc->sc_iwin[2].iwin_xlate = 0;
+       sc->sc_iwin[2].iwin_size = 0;
+
        if (sc->sc_is_host) {
-               sc->sc_iwin[2].iwin_base_lo = memstart |
+               sc->sc_iwin[3].iwin_base_lo = memstart |
                    PCI_MAPREG_MEM_PREFETCHABLE_MASK |
                    PCI_MAPREG_MEM_TYPE_64BIT;
-               sc->sc_iwin[2].iwin_base_hi = 0;
-               sc->sc_iwin[2].iwin_xlate = memstart;
-               sc->sc_iwin[2].iwin_size = memsize;
+               sc->sc_iwin[3].iwin_base_hi = 0;
+               sc->sc_iwin[3].iwin_xlate = memstart;
+               sc->sc_iwin[3].iwin_size = memsize;
        } else {
-               panic("i80321: iwin[2] slave");
+               panic("i80321: iwin[3] slave");
        }
 
        /*



Home | Main Index | Thread Index | Old Index