commit 1815e61b1a7efe81017a883e817292daf7d2f922
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:40 2015 +0200
mmc: mmc: Improve reliability of mmc_select_hs200()
Currently mmc_select_hs200() uses __mmc_switch() which checks the
success of the switch to HS200 mode using CMD13 (SEND_STATUS).
The problem is that it does that using the timing settings of legacy
mode. That is prone to error, not least because the timing parameters
for legacy mode are tighter than the timing parameters for HS200 mode.
In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
with the switch command, it must be assumed that using different modes on
the card and host must work.
However in the case when CMD13 polling is not used
(i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs200() can be made more
reliable by setting the host to the correct timing before sending CMD13.
This patch does that.
A complication is that the caller, mmc_select_timing(), will ignore a
switch error (indicated by -EBADMSG), assume the old mode is valid
and continue, so the old timing must be restored in that case.
commit 51b12f7764fa8bb464cbd0f7bbd3a408d21ade16
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:41 2015 +0200
mmc: mmc: Fix HS setting in mmc_select_hs400()
mmc_select_hs400() begins with the card and host in HS200 mode.
Therefore, any commands sent to the card should use HS200 timing.
It is incorrect to set the host to High Speed (HS) timing before
sending the switch command. Doing so is unreliable because
the timing parameters for HS mode are tighter than the timing
parameters for HS200 mode. Thus the HS timings should be set
only after the card has switched mode.
However, it is not unreasonable first to reduce the frequency to
the HS mode frequency, which should make the switch command and
subsequent CMD13 commands more reliable.
commit d23029332c3d51fb5ac117ba5cde4dc0a3ec3fa6
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:43 2015 +0200
mmc: mmc: Improve reliability of mmc_select_hs400()
mmc_select_hs400() calls __mmc_switch() which checks the switch is
successful using CMD13 (SEND_STATUS). The problem is that it does that
using the timing settings of the previous mode. That is prone to error,
especially when switching from HS to HS400 because the timing parameters
for HS mode are tighter than the timing parameters for HS400 mode.
In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
with the switch command, it must be assumed that using different modes on
the card and host must work.
However in the case when CMD13 polling is not used
(i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs400() can be made more
reliable by setting the host to the correct timing before sending CMD13.
commit adb24d42a516bca8b9741ed21206509daaab5b13
Author: Wenkai Du <email address hidden>
Date: Thu Nov 26 14:00:44 2015 +0200
mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400
Commit cc4f414c885c ("mmc: mmc: Add driver strength selection")
added driver strength selection for eMMC HS200 and HS400 modes.
That patch also set the driver stength when transitioning through
High Speed mode to HS200/HS400, but driver strength is not defined
for High Speed mode. While the JEDEC specification is not clear
on this point it has been observed to cause problems for some eMMC,
and removing the driver strength setting in this case makes it
consistent with the normal use of High Speed mode.
commit 1815e61b1a7efe8 1017a883e817292 daf7d2f922
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:40 2015 +0200
mmc: mmc: Improve reliability of mmc_select_hs200()
Currently mmc_select_hs200() uses __mmc_switch() which checks the
success of the switch to HS200 mode using CMD13 (SEND_STATUS).
The problem is that it does that using the timing settings of legacy
mode. That is prone to error, not least because the timing parameters
for legacy mode are tighter than the timing parameters for HS200 mode.
In the case when CMD13 polling is used (i.e. not MMC_CAP_ WAIT_WHILE_ BUSY)
with the switch command, it must be assumed that using different modes on
the card and host must work.
However in the case when CMD13 polling is not used WAIT_WHILE_ BUSY) mmc_select_hs200() can be made more
(i.e. MMC_CAP_
reliable by setting the host to the correct timing before sending CMD13.
This patch does that.
A complication is that the caller, mmc_select_ timing( ), will ignore a
switch error (indicated by -EBADMSG), assume the old mode is valid
and continue, so the old timing must be restored in that case.
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # 4.2+
Tested-by: Alim Akhtar <email address hidden>
Signed-off-by: Ulf Hansson <email address hidden>
commit 51b12f7764fa8bb 464cbd0f7bbd3a4 08d21ade16
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:41 2015 +0200
mmc: mmc: Fix HS setting in mmc_select_hs400()
mmc_ select_ hs400() begins with the card and host in HS200 mode.
Therefore, any commands sent to the card should use HS200 timing.
It is incorrect to set the host to High Speed (HS) timing before
sending the switch command. Doing so is unreliable because
the timing parameters for HS mode are tighter than the timing
parameters for HS200 mode. Thus the HS timings should be set
only after the card has switched mode.
However, it is not unreasonable first to reduce the frequency to
the HS mode frequency, which should make the switch command and
subsequent CMD13 commands more reliable.
This patch does that.
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # 4.2+
Tested-by: Alim Akhtar <email address hidden>
Signed-off-by: Ulf Hansson <email address hidden>
commit 974007aaf240aa1 95b31c34cfdb013 524a2dcfca
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:42 2015 +0200
mmc: mmc: Move mmc_switch_status()
Move the mmc_switch_status() function in preparation for calling it
in mmc_select_hs400().
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # 4.2+
Tested-by: Alim Akhtar <email address hidden>
Signed-off-by: Ulf Hansson <email address hidden>
commit d23029332c3d51f b5ac117ba5cde4d c0a3ec3fa6
Author: Adrian Hunter <email address hidden>
Date: Wed Oct 28 14:25:43 2015 +0200
mmc: mmc: Improve reliability of mmc_select_hs400()
mmc_ select_ hs400() calls __mmc_switch() which checks the switch is
successful using CMD13 (SEND_STATUS). The problem is that it does that
using the timing settings of the previous mode. That is prone to error,
especially when switching from HS to HS400 because the timing parameters
for HS mode are tighter than the timing parameters for HS400 mode.
In the case when CMD13 polling is used (i.e. not MMC_CAP_ WAIT_WHILE_ BUSY)
with the switch command, it must be assumed that using different modes on
the card and host must work.
However in the case when CMD13 polling is not used WAIT_WHILE_ BUSY) mmc_select_hs400() can be made more
(i.e. MMC_CAP_
reliable by setting the host to the correct timing before sending CMD13.
This patch does that.
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # 4.2+
Tested-by: Alim Akhtar <email address hidden>
Signed-off-by: Ulf Hansson <email address hidden>
commit 1ca896856281d3f 1ad4f6f7d4e32e2 943452de23
Author: Adrian Hunter <email address hidden>
Date: Thu Nov 26 14:00:45 2015 +0200
mmc: sdhci-pci: Do not default to 33 Ohm driver strength for Intel SPT
In some cases, the stronger 33 Ohm driver strength must not be used
so it is not a suitable default. Change it to the standard default
50 Ohm value.
The patch applies to v4.2+ except the file name changed. It is mmc/host/ sdhci-pci. c prior to v.4.4.
drivers/
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # v4.2+
Signed-off-by: Ulf Hansson <email address hidden>
commit adb24d42a516bca 8b9741ed2120650 9daaab5b13
Author: Wenkai Du <email address hidden>
Date: Thu Nov 26 14:00:44 2015 +0200
mmc: mmc: Fix incorrect use of driver strength switching HS200 and HS400
Commit cc4f414c885c ("mmc: mmc: Add driver strength selection")
added driver strength selection for eMMC HS200 and HS400 modes.
That patch also set the driver stength when transitioning through
High Speed mode to HS200/HS400, but driver strength is not defined
for High Speed mode. While the JEDEC specification is not clear
on this point it has been observed to cause problems for some eMMC,
and removing the driver strength setting in this case makes it
consistent with the normal use of High Speed mode.
Signed-off-by: Wenkai Du <email address hidden>
Signed-off-by: Adrian Hunter <email address hidden>
Cc: <email address hidden> # v4.2+
Signed-off-by: Ulf Hansson <email address hidden>