Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/nvidia Need to limit the DMA range for tx1. As...



details:   https://anonhg.NetBSD.org/src/rev/9104c076921f
branches:  trunk
changeset: 969319:9104c076921f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Feb 15 12:45:05 2020 +0000

description:
Need to limit the DMA range for tx1.  Assume 32bit DMA everywhere for now.

diffstat:

 sys/arch/arm/nvidia/tegra_sdhc.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r d4f1ff823d41 -r 9104c076921f sys/arch/arm/nvidia/tegra_sdhc.c
--- a/sys/arch/arm/nvidia/tegra_sdhc.c  Sat Feb 15 12:20:35 2020 +0000
+++ b/sys/arch/arm/nvidia/tegra_sdhc.c  Sat Feb 15 12:45:05 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_sdhc.c,v 1.24 2019/10/13 06:11:31 skrll Exp $ */
+/* $NetBSD: tegra_sdhc.c,v 1.25 2020/02/15 12:45:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.24 2019/10/13 06:11:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.25 2020/02/15 12:45:05 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -111,7 +111,14 @@
                bus_width = 4;
 
        sc->sc.sc_dev = self;
-       sc->sc.sc_dmat = faa->faa_dmat;
+
+       error = bus_dmatag_subregion(faa->faa_dmat, 0, 0xffffffff,
+           &sc->sc.sc_dmat, BUS_DMA_WAITOK);
+       if (error != 0) {
+               aprint_error(": couldn't create DMA tag: %d\n", error);
+               return;
+       }
+
        sc->sc.sc_flags = SDHC_FLAG_32BIT_ACCESS |
                          SDHC_FLAG_NO_PWR0 |
                          SDHC_FLAG_NO_CLKBASE |



Home | Main Index | Thread Index | Old Index