Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/allwinner do BUS_DMASYNC_POSTWRITE after transf...
details: https://anonhg.NetBSD.org/src/rev/fd9a021d128d
branches: trunk
changeset: 332169:fd9a021d128d
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Sep 09 19:23:46 2014 +0000
description:
do BUS_DMASYNC_POSTWRITE after transfer completes
diffstat:
sys/arch/arm/allwinner/awin_mmc.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 5e541c625547 -r fd9a021d128d sys/arch/arm/allwinner/awin_mmc.c
--- a/sys/arch/arm/allwinner/awin_mmc.c Tue Sep 09 15:14:39 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_mmc.c Tue Sep 09 19:23:46 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.7 2014/09/08 23:51:48 jmcneill Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.8 2014/09/09 19:23:46 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.7 2014/09/08 23:51:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.8 2014/09/09 19:23:46 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -631,6 +631,13 @@
}
static void
+awin_mmc_dma_complete(struct awin_mmc_softc *sc)
+{
+ bus_dmamap_sync(sc->sc_dmat, sc->sc_idma_map, 0,
+ sc->sc_idma_size, BUS_DMASYNC_POSTWRITE);
+}
+
+static void
awin_mmc_exec_command(sdmmc_chipset_handle_t sch, struct sdmmc_command *cmd)
{
struct awin_mmc_softc *sc = sch;
@@ -693,6 +700,7 @@
cmd->c_error = cv_timedwait(&sc->sc_idst_cv,
&sc->sc_intr_lock, hz*10);
}
+ awin_mmc_dma_complete(sc);
if (sc->sc_idma_idst & AWIN_MMC_IDST_ERROR) {
cmd->c_error = EIO;
} else if (!(sc->sc_idma_idst & AWIN_MMC_IDST_COMPLETE)) {
Home |
Main Index |
Thread Index |
Old Index