diff options
-rw-r--r-- | drivers/mmc/host/sdhci_f_sdh30.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 111b66f5439b..04ca0d33a521 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/property.h> | ||
16 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
17 | 18 | ||
18 | #include "sdhci-pltfm.h" | 19 | #include "sdhci-pltfm.h" |
@@ -47,6 +48,7 @@ struct f_sdhost_priv { | |||
47 | struct clk *clk; | 48 | struct clk *clk; |
48 | u32 vendor_hs200; | 49 | u32 vendor_hs200; |
49 | struct device *dev; | 50 | struct device *dev; |
51 | bool enable_cmd_dat_delay; | ||
50 | }; | 52 | }; |
51 | 53 | ||
52 | static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host) | 54 | static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host) |
@@ -84,10 +86,19 @@ static unsigned int sdhci_f_sdh30_get_min_clock(struct sdhci_host *host) | |||
84 | 86 | ||
85 | static void sdhci_f_sdh30_reset(struct sdhci_host *host, u8 mask) | 87 | static void sdhci_f_sdh30_reset(struct sdhci_host *host, u8 mask) |
86 | { | 88 | { |
89 | struct f_sdhost_priv *priv = sdhci_priv(host); | ||
90 | u32 ctl; | ||
91 | |||
87 | if (sdhci_readw(host, SDHCI_CLOCK_CONTROL) == 0) | 92 | if (sdhci_readw(host, SDHCI_CLOCK_CONTROL) == 0) |
88 | sdhci_writew(host, 0xBC01, SDHCI_CLOCK_CONTROL); | 93 | sdhci_writew(host, 0xBC01, SDHCI_CLOCK_CONTROL); |
89 | 94 | ||
90 | sdhci_reset(host, mask); | 95 | sdhci_reset(host, mask); |
96 | |||
97 | if (priv->enable_cmd_dat_delay) { | ||
98 | ctl = sdhci_readl(host, F_SDH30_ESD_CONTROL); | ||
99 | ctl |= F_SDH30_CMD_DAT_DELAY; | ||
100 | sdhci_writel(host, ctl, F_SDH30_ESD_CONTROL); | ||
101 | } | ||
91 | } | 102 | } |
92 | 103 | ||
93 | static const struct sdhci_ops sdhci_f_sdh30_ops = { | 104 | static const struct sdhci_ops sdhci_f_sdh30_ops = { |
@@ -126,6 +137,9 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev) | |||
126 | host->quirks2 = SDHCI_QUIRK2_SUPPORT_SINGLE | | 137 | host->quirks2 = SDHCI_QUIRK2_SUPPORT_SINGLE | |
127 | SDHCI_QUIRK2_TUNING_WORK_AROUND; | 138 | SDHCI_QUIRK2_TUNING_WORK_AROUND; |
128 | 139 | ||
140 | priv->enable_cmd_dat_delay = device_property_read_bool(dev, | ||
141 | "fujitsu,cmd-dat-delay-select"); | ||
142 | |||
129 | ret = mmc_of_parse(host->mmc); | 143 | ret = mmc_of_parse(host->mmc); |
130 | if (ret) | 144 | if (ret) |
131 | goto err; | 145 | goto err; |