Skip to content

Commit c96a33a

Browse files
Windrow14xiaoxiang781216
authored andcommitted
drivers/mmcsd/mmcsd_sdio.c: enable clock before issue CMD0
In mmcsd_cardidentify(), the clock is not enabled before issuing CMD0, and the clock has been disabled in mmcsd_removed(). It makes no sense to enable the clock after issuing CMD0, because when CMD0 is issued, it will exit with error due to the clock is not enabled. Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com> Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Jacky Cao <Jacky.Cao@sony.com> Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
1 parent d07e73e commit c96a33a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/mmcsd/mmcsd_sdio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,17 +3463,17 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
34633463
return -ENODEV;
34643464
}
34653465

3466+
/* Set ID mode clocking (<400KHz) */
3467+
3468+
SDIO_CLOCK(priv->dev, CLOCK_IDMODE);
3469+
34663470
/* For eMMC, Send CMD0 with argument 0xf0f0f0f0 as per JEDEC v4.41
34673471
* for pre-idle. No effect for SD.
34683472
*/
34693473

34703474
mmcsd_sendcmdpoll(priv, MMCSD_CMD0, 0xf0f0f0f0);
34713475
nxsig_usleep(MMCSD_IDLE_DELAY);
34723476

3473-
/* Set ID mode clocking (<400KHz) */
3474-
3475-
SDIO_CLOCK(priv->dev, CLOCK_IDMODE);
3476-
34773477
/* After power up at least 74 clock cycles are required prior to starting
34783478
* bus communication
34793479
*/

0 commit comments

Comments
 (0)