From 9eed76bc86e2f8d16a01a4932aa83c31c7a42ba9 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 23 Aug 2018 18:33:42 +0000 Subject: [PATCH] aw_mmc: Handle MMCBR_IVAR_RETUNE_REQ Without this the mmc stack sometimes think that we are in in a retune operation and some command like switch the bus width to 4 bits failed. We now switch correctly to 4 bits mode for sd card. Reported by: jmg, others in pine64 irc channel --- sys/arm/allwinner/aw_mmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 3962662c21a9..887b91d16268 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -1198,6 +1198,9 @@ aw_mmc_read_ivar(device_t bus, device_t child, int which, *(int *)result = (sc->aw_mmc_conf->dma_xferlen * AW_MMC_DMA_SEGS) / MMC_SECTOR_SIZE; break; + case MMCBR_IVAR_RETUNE_REQ: + *(int *)result = retune_req_none; + break; } return (0);