sd: sdmmc: wait before sending second OCR
introduce a small wait between probing and initialization OCR. This delay fixes a failure to initialize seen on some SD cards Fixes #47238 Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
2647bc0cf5
commit
ba9220c5bd
1 changed files with 5 additions and 0 deletions
|
@ -998,6 +998,11 @@ int sdmmc_card_init(struct sd_card *card)
|
|||
ocr_arg |= SD_OCR_VDD29_30FLAG;
|
||||
}
|
||||
ocr_arg |= (SD_OCR_VDD32_33FLAG | SD_OCR_VDD33_34FLAG);
|
||||
/* Momentary delay before initialization OCR. Some cards will
|
||||
* never leave busy state if init OCR is sent too soon after
|
||||
* probing OCR
|
||||
*/
|
||||
k_busy_wait(100);
|
||||
/* Send SD OCR to card to initialize it */
|
||||
ret = sdmmc_send_ocr(card, ocr_arg);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue