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 don't need a full reset to recover fr...
details: https://anonhg.NetBSD.org/src/rev/90eb6975273b
branches: trunk
changeset: 339763:90eb6975273b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Aug 08 17:21:19 2015 +0000
description:
don't need a full reset to recover from errors, only DMA and FIFO resets
diffstat:
sys/arch/arm/allwinner/awin_mmc.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r d6cc7d1b6b93 -r 90eb6975273b sys/arch/arm/allwinner/awin_mmc.c
--- a/sys/arch/arm/allwinner/awin_mmc.c Sat Aug 08 16:11:15 2015 +0000
+++ b/sys/arch/arm/allwinner/awin_mmc.c Sat Aug 08 17:21:19 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_mmc.c,v 1.20 2014/12/07 20:10:59 jmcneill Exp $ */
+/* $NetBSD: awin_mmc.c,v 1.21 2015/08/08 17:21:19 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.20 2014/12/07 20:10:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_mmc.c,v 1.21 2015/08/08 17:21:19 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -976,7 +976,14 @@
#ifdef AWIN_MMC_DEBUG
aprint_error_dev(sc->sc_dev, "i/o error %d\n", cmd->c_error);
#endif
- awin_mmc_host_reset(sc);
+ MMC_WRITE(sc, AWIN_MMC_GCTRL,
+ MMC_READ(sc, AWIN_MMC_GCTRL) |
+ AWIN_MMC_GCTRL_DMARESET | AWIN_MMC_GCTRL_FIFORESET);
+ for (int retry = 0; retry < 1000; retry++) {
+ if (!(MMC_READ(sc, AWIN_MMC_GCTRL) & AWIN_MMC_GCTRL_RESET))
+ break;
+ delay(10);
+ }
awin_mmc_update_clock(sc);
}
Home |
Main Index |
Thread Index |
Old Index