mmc: sdhci-esdhc-imx: add sd3.0 SDR clock tuning support
authorDong Aisheng <b29396@freescale.com>
Fri, 13 Sep 2013 11:11:34 +0000 (19:11 +0800)
committerChris Ball <cjb@laptop.org>
Thu, 26 Sep 2013 11:57:23 +0000 (07:57 -0400)
commit0322191e62984b94d1b2ae5ff322112e1fa1ef1a
treee58c406d1dcbf45d77a6cc7fb1acbda8179001a7
parentfed2f6e2d42e4bcdec5ea357e7a9db8602744753
mmc: sdhci-esdhc-imx: add sd3.0 SDR clock tuning support

Freescale i.MX6Q/DL uSDHC clock tuning progress is a little different from
the standard tuning process defined in host controller spec v3.0.
Thus we use platform_execute_tuning instead of standard sdhci tuning.

The main difference are:
1) not only generate Buffer Read Ready interrupt when tuning is performing.
   It generates all other DATA interrupts like the normal data command.
2) SDHCI_CTRL_EXEC_TUNING is not automatically cleared by HW,
   instead it's controlled by SW.
3) SDHCI_CTRL_TUNED_CLK is not automatically set by HW,
   it's controlled by SW.
4) the clock delay for every tuning is set by SW.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-esdhc-imx.c