mmc: sdhci-esdhc-imx: adding eMMC HS200 mode support
Subsystems (4)
cover mmc: sdhci-esdhc-imx: adding eMMC HS200 mode support
The tuning in latest tree is broken.
This patch fixed it and add HS200 support for imx usdhc.
Patch 2 had been sent out in:
[PATCH 0/7] mmc: sdhci-esdhc-imx: fix acmd23 unwork and ddr not supported on sabresd issues No changes since that.
Dong Aisheng (2):
mmc: sdhci: replace msleep with mdelay for tuning
mmc: sdhci-esdhc-imx: add eMMC HS200 mode support
drivers/mmc/host/sdhci-esdhc-imx.c | 2 ++ drivers/mmc/host/sdhci.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.2.rc3
PATCH 1/2 mmc: sdhci: replace msleep with mdelay for tuning
The former patch 404aceb may break the tuning process of SD3.0/eMMC4.5 cards. It changed the mdelay in tuning process to msleep,
However, because the more delay of msleep(1) than mdelay(1), it will easily lead to a 150ms timeout as limited by the spec.
We oberved tuning failed due to timeout on a Toshiba UHS and eMMC4.5 card after this change. Thus, for the time sensitive tuning process, change it back to mdelay as before.
The breaking patch is:
404aceb mmc: sdhci: Get rid of mdelay()s where it is safe and makes sense
--- drivers/mmc/host/sdhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
@@ -1981,7 +1981,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl =sdhci_readw (host,SDHCI_HOST_CONTROL2 ); tuning_loop_counter--; -msleep (1 ); +mdelay (1 ); }while (ctrl &SDHCI_CTRL_EXEC_TUNING );/*
Signature · 1 line
1.7.2.rc3
PATCH 1/2 mmc: sdhci: replace msleep with mdelay for tuning
Copy Jeremie for comment.
Quoted 11 lines · Dong Aisheng
The former patch 404aceb may break the tuning process of SD3.0/eMMC4.5 cards. It changed the mdelay in tuning process to msleep,
However, because the more delay of msleep(1) than mdelay(1), it will easily lead to a 150ms timeout as limited by the spec.We oberved tuning failed due to timeout on a Toshiba UHS and eMMC4.5 card after this change. Thus, for the time sensitive tuning process, change it back to mdelay as before.
The breaking patch is:
404aceb mmc: sdhci: Get rid of mdelay()s where it is safe and makes sense
The ID of the commit in linux-next is 946498b
Shawn
Quoted 23 lines
Signed-off-by Dong Aisheng <[email protected]>--- drivers/mmc/host/sdhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/mmc/host/sdhci.c +1
-1@@ -1981,7 +1981,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl =sdhci_readw (host,SDHCI_HOST_CONTROL2 ); tuning_loop_counter--; -msleep (1 ); +mdelay (1 ); }while (ctrl &SDHCI_CTRL_EXEC_TUNING );/* Signature · 1 line
1.7.2.rc3
PATCH 2/2 mmc: sdhci-esdhc-imx: add eMMC HS200 mode support
In reply to Dong AishengAdd support for eMMC 4.5 cards to work on hs200 mode.
--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +2 -0
@@ -825,6 +825,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host, pinctrl = imx_data->pins_100mhz;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : pinctrl = imx_data->pins_200mhz;break ;default :
@@ -852,6 +853,7 @@ static int esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR50 ;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR104 ;break ;case MMC_TIMING_UHS_DDR50 :
Signature · 1 line
1.7.2.rc3
PATCH 2/2 mmc: sdhci-esdhc-imx: add eMMC HS200 mode support
Quoted 3 lines · Dong Aisheng
Add support for eMMC 4.5 cards to work on hs200 mode.
Signed-off-by Dong Aisheng <[email protected]>
Quoted 28 lines
--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-esdhc-imx.c +2
-0@@ -825,6 +825,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host, pinctrl = imx_data->pins_100mhz;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : pinctrl = imx_data->pins_200mhz;break ;default :@@ -852,6 +853,7 @@ static int esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR50 ;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR104 ;break ;case MMC_TIMING_UHS_DDR50 :Signature · 1 line
1.7.2.rc3
PATCH 2/2 mmc: sdhci-esdhc-imx: add eMMC HS200 mode support
Hi Chris,
Quoted 7 lines · Shawn Guo
Quoted 3 lines · Dong Aisheng
Add support for eMMC 4.5 cards to work on hs200 mode.
Signed-off-by Dong Aisheng <[email protected]>Acked-by Shawn Guo <[email protected]>
Would you help pick this series too?
Regards
Dong Aisheng
Quoted 34 lines
Quoted 25 lines
--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/mmc/host/sdhci-esdhc-imx.c +2
-1@@ -825,6 +825,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host, pinctrl = imx_data->pins_100mhz;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : pinctrl = imx_data->pins_200mhz;break ;default :@@ -852,6 +853,7 @@ static int esdhc_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR50 ;break ;case MMC_TIMING_UHS_SDR104 : +case MMC_TIMING_MMC_HS200 : imx_data->uhs_mode =SDHCI_CTRL_UHS_SDR104 ;break ;case MMC_TIMING_UHS_DDR50 : --Quoted 3 lines
1.7.2.rc3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
cover mmc: sdhci-esdhc-imx: adding eMMC HS200 mode support
In reply to Dong AishengHi Dong,
Quoted 7 lines · Dong Aisheng
Dong Aisheng (2):
mmc: sdhci: replace msleep with mdelay for tuning
mmc: sdhci-esdhc-imx: add eMMC HS200 mode supportdrivers/mmc/host/sdhci-esdhc-imx.c | 2 ++ drivers/mmc/host/sdhci.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)
Patch 1 is no longer required, applied patch 2 to mmc-next for 3.14, thanks.
- Chris.
Signature · 1 line
Chris Ball <[email protected]> <http://printf.net/>