]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: sdhci-esdhc-imx: add delay line setting support
authorDong Aisheng <b29396@freescale.com>
Mon, 21 Oct 2013 08:54:40 +0000 (16:54 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:35 +0000 (10:06 +0200)
The DLL(Delay Line) is newly added to assist in sampling read data.
The DLL provides the ability to programmatically select a quantized
delay (in fractions of the clock period) regardless of on-chip variations
such as process, voltage and temperature (PVT).

This patch adds a user interface to set slave delay line via device tree.
It's usually used in high speed mode like mmc DDR mode when the signal
quality is not good caused by board design, e.g. the signal path is too
long.  User can manually set delay line to find a suitable data sampling
window for card to work properly.

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

index ccec0e32590f6b5f9336f0fc77df279e429756a2..6c3a5641418774b83a3300f317d30a002e6230ee 100644 (file)
 #define ESDHC_DLL_OVERRIDE_VAL_SHIFT   9
 #define ESDHC_DLL_OVERRIDE_EN_SHIFT    8
 
+/* dll control register */
+#define ESDHC_DLL_CTRL                 0x60
+#define ESDHC_DLL_OVERRIDE_VAL_SHIFT   9
+#define ESDHC_DLL_OVERRIDE_EN_SHIFT    8
+
 /* tune control register */
 #define ESDHC_TUNE_CTRL_STATUS         0x68
 #define  ESDHC_TUNE_CTRL_STEP          1