Module Name: src
Committed By: cliff
Date: Sat Apr 17 07:33:33 UTC 2010
Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_obio.c rmixlvar.h
Log Message:
- struct rmixl_config field 'rc_64bit_dmat' is now a bus_dma_tag_t
and initially points at 'rc_dma_tag' which provides the store area.
this allows rc_64bit_dmat to be subregioned for imposing
bounce-buffering if needed.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/arch/mips/rmi/rmixl_obio.c
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/sys/arch/mips/rmi/rmixlvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/rmi/rmixl_obio.c
diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.15 src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.16
--- src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.15 Mon Apr 12 22:42:06 2010
+++ src/sys/arch/mips/rmi/rmixl_obio.c Sat Apr 17 07:33:33 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_obio.c,v 1.1.2.15 2010/04/12 22:42:06 cliff Exp $ */
+/* $NetBSD: rmixl_obio.c,v 1.1.2.16 2010/04/17 07:33:33 cliff Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.15 2010/04/12 22:42:06 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.16 2010/04/17 07:33:33 cliff Exp $");
#include "locators.h"
#include "pci.h"
@@ -186,12 +186,13 @@
rmixl_obio_el_bus_mem_init(&rcp->rc_obio_el_memt, rcp);
/* dma space for all memory, including >= 4GB */
- if (rcp->rc_64bit_dmat._cookie == 0)
- obio_dma_init_64(&rcp->rc_64bit_dmat);
+ if (rcp->rc_dma_tag._cookie == 0)
+ obio_dma_init_64(&rcp->rc_dma_tag);
+ rcp->rc_64bit_dmat = &rcp->rc_dma_tag;
/* dma space for addr < 4GB */
if (rcp->rc_32bit_dmat == NULL) {
- error = bus_dmatag_subregion(&rcp->rc_64bit_dmat,
+ error = bus_dmatag_subregion(rcp->rc_64bit_dmat,
0, (bus_addr_t)1 << 32, &rcp->rc_32bit_dmat, 0);
if (error)
panic("%s: failed to create 32bit dma tag: %d",
@@ -213,7 +214,7 @@
sc->sc_el_bst = (bus_space_tag_t)&rcp->rc_obio_el_memt;
sc->sc_29bit_dmat = rcp->rc_29bit_dmat;
sc->sc_32bit_dmat = rcp->rc_32bit_dmat;
- sc->sc_64bit_dmat = &rcp->rc_64bit_dmat;
+ sc->sc_64bit_dmat = rcp->rc_64bit_dmat;
}
static void
Index: src/sys/arch/mips/rmi/rmixlvar.h
diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.17 src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.18
--- src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.17 Wed Apr 7 19:24:13 2010
+++ src/sys/arch/mips/rmi/rmixlvar.h Sat Apr 17 07:33:33 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixlvar.h,v 1.1.2.17 2010/04/07 19:24:13 cliff Exp $ */
+/* $NetBSD: rmixlvar.h,v 1.1.2.18 2010/04/17 07:33:33 cliff Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -124,7 +124,8 @@
struct mips_bus_space rc_pci_ecfg_memt; /* PCI ECFG */
struct mips_bus_space rc_pci_memt; /* PCI MEM */
struct mips_bus_space rc_pci_iot; /* PCI IO */
- struct mips_bus_dma_tag rc_64bit_dmat;
+ struct mips_bus_dma_tag rc_dma_tag;
+ bus_dma_tag_t rc_64bit_dmat;
bus_dma_tag_t rc_32bit_dmat;
bus_dma_tag_t rc_29bit_dmat;
struct extent *rc_phys_ex; /* Note: MB units */