diff options
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r-- | sys/arch/armv7/omap/ommmc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/armv7/omap/ommmc.c b/sys/arch/armv7/omap/ommmc.c index ee25c31a42e..0797c492459 100644 --- a/sys/arch/armv7/omap/ommmc.c +++ b/sys/arch/armv7/omap/ommmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ommmc.c,v 1.31 2017/01/21 05:42:03 guenther Exp $ */ +/* $OpenBSD: ommmc.c,v 1.32 2020/01/13 13:30:42 mpi Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> @@ -180,9 +180,9 @@ #define MMCHS_CUR_CAPA 0x148 #define MMCHS_REV 0x1fc -#define SDHC_COMMAND_TIMEOUT hz -#define SDHC_BUFFER_TIMEOUT hz -#define SDHC_TRANSFER_TIMEOUT hz +#define SDHC_COMMAND_TIMEOUT 1 /* sec */ +#define SDHC_BUFFER_TIMEOUT 1 /* sec */ +#define SDHC_TRANSFER_TIMEOUT 1 /* sec */ int ommmc_match(struct device *, void *, void *); void ommmc_attach(struct device *, struct device *, void *); @@ -1123,7 +1123,7 @@ ommmc_soft_reset(struct ommmc_softc *sc, int mask) } int -ommmc_wait_intr(struct ommmc_softc *sc, int mask, int timo) +ommmc_wait_intr(struct ommmc_softc *sc, int mask, int sec) { int status; int s; @@ -1133,8 +1133,8 @@ ommmc_wait_intr(struct ommmc_softc *sc, int mask, int timo) s = splsdmmc(); status = sc->intr_status & mask; while (status == 0) { - if (tsleep(&sc->intr_status, PWAIT, "hcintr", timo) - == EWOULDBLOCK) { + if (tsleep_nsec(&sc->intr_status, PWAIT, "hcintr", + SEC_TO_NSEC(sec)) == EWOULDBLOCK) { status |= MMCHS_STAT_ERRI; break; } |