mmcsd_sdio: Arm the write complete detection

The Multiblock write path was missing the
   the SDIO_WAITENABLE with SDIOWAIT_WRCOMPLETE.

   This could be seen with debugging turned on as

   mmcsd_eventwait: ERROR: Awakened with 10
   mmcsd_transferready: ERROR: mmcsd_eventwait for transfer ready failed: -5
This commit is contained in:
David Sidrane 2020-09-09 09:12:07 -07:00 committed by Abdelatif Guettouche
parent 459ad29799
commit 55b48b14eb

View File

@ -2077,6 +2077,12 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
priv->wrbusy = true;
#if defined(CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE)
/* Arm the write complete detection with timeout */
SDIO_WAITENABLE(priv->dev, SDIOWAIT_WRCOMPLETE | SDIOWAIT_TIMEOUT);
#endif
/* On success, return the number of blocks written */
return nblocks;