Commit 0797e5f
mmc: core: Fixup signal voltage switch
When switching SD and SDIO cards from 3.3V to 1.8V signal levels, the
clock should be gated for 5 ms during the step. After enabling the
clock, the host should wait for at least 1 ms before checking for
failure. Failure by the card to switch is indicated by dat[0:3] being
pulled low. The host should check for this condition and power-cycle
the card if failure is indicated.
Add a retry mechanism for the SDIO case.
If the voltage switch fails repeatedly, give up and continue the
initialization using the original voltage.
This patch places a couple of requirements on the host driver:
1) mmc_set_ios with ios.clock = 0 must gate the clock
2) mmc_power_off must actually cut the power to the card
3) The card_busy host_ops member must be implemented
if these requirements are not fulfilled, the 1.8V signal voltage switch
will still be attempted but may not be successful.
Signed-off-by: Johan Rudholm <[email protected]>
Signed-off-by: Kevin Liu <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Tested-by: Wei WANG <[email protected]>
Signed-off-by: Chris Ball <[email protected]>1 parent 567c890 commit 0797e5f
3 files changed
+107
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1340 | 1340 | | |
1341 | 1341 | | |
1342 | 1342 | | |
| 1343 | + | |
1343 | 1344 | | |
1344 | 1345 | | |
1345 | 1346 | | |
1346 | 1347 | | |
1347 | 1348 | | |
1348 | 1349 | | |
1349 | 1350 | | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1351 | + | |
| 1352 | + | |
1354 | 1353 | | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1358 | 1371 | | |
1359 | | - | |
1360 | | - | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1361 | 1384 | | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1362 | 1392 | | |
1363 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1364 | 1427 | | |
1365 | 1428 | | |
1366 | 1429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
715 | 723 | | |
716 | 724 | | |
717 | 725 | | |
| |||
733 | 741 | | |
734 | 742 | | |
735 | 743 | | |
736 | | - | |
| 744 | + | |
| 745 | + | |
737 | 746 | | |
738 | | - | |
| 747 | + | |
739 | 748 | | |
740 | 749 | | |
741 | 750 | | |
| |||
746 | 755 | | |
747 | 756 | | |
748 | 757 | | |
749 | | - | |
750 | 758 | | |
751 | 759 | | |
752 | 760 | | |
| |||
758 | 766 | | |
759 | 767 | | |
760 | 768 | | |
761 | | - | |
762 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
763 | 774 | | |
764 | 775 | | |
765 | 776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
| |||
646 | 655 | | |
647 | 656 | | |
648 | 657 | | |
649 | | - | |
| 658 | + | |
650 | 659 | | |
651 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
652 | 668 | | |
653 | 669 | | |
654 | 670 | | |
| |||
0 commit comments