Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Call the second sdmmc_mem_send_if_cond() only ...
details: https://anonhg.NetBSD.org/src/rev/8c60caa95660
branches: trunk
changeset: 344112:8c60caa95660
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Mar 13 09:12:16 2016 +0000
description:
Call the second sdmmc_mem_send_if_cond() only where it's necessary.
This makes SMC_CAPS_SPI_MODE devices (currently evbsh3 only) work again.
"Maybe ok" from nonaka@.
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r 3e7e43fba2f8 -r 8c60caa95660 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Sun Mar 13 09:01:04 2016 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Sun Mar 13 09:12:16 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.50 2015/12/22 09:56:06 mlelstv Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.51 2016/03/13 09:12:16 tsutsui Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -45,7 +45,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.50 2015/12/22 09:56:06 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.51 2016/03/13 09:12:16 tsutsui Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -198,15 +198,14 @@
goto out;
}
- /* Tell the card(s) to enter the idle state (again). */
- sdmmc_go_idle_state(sc);
-
DPRINTF(("%s: host_ocr 0x%08x\n", SDMMCDEVNAME(sc), host_ocr));
DPRINTF(("%s: card_ocr 0x%08x\n", SDMMCDEVNAME(sc), card_ocr));
host_ocr &= card_ocr; /* only allow the common voltages */
if (!ISSET(sc->sc_caps, SMC_CAPS_SPI_MODE)) {
if (ISSET(sc->sc_flags, SMF_SD_MODE)) {
+ /* Tell the card(s) to enter the idle state (again). */
+ sdmmc_go_idle_state(sc);
/* Check SD Ver.2 */
error = sdmmc_mem_send_if_cond(sc, 0x1aa, &card_ocr);
if (error == 0 && card_ocr == 0x1aa)
Home |
Main Index |
Thread Index |
Old Index