diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-cns3xxx.c')
-rw-r--r-- | drivers/mmc/host/sdhci-cns3xxx.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mmc/host/sdhci-cns3xxx.c b/drivers/mmc/host/sdhci-cns3xxx.c index f2cc26633cb2..14b74075589a 100644 --- a/drivers/mmc/host/sdhci-cns3xxx.c +++ b/drivers/mmc/host/sdhci-cns3xxx.c | |||
@@ -30,13 +30,12 @@ static void sdhci_cns3xxx_set_clock(struct sdhci_host *host, unsigned int clock) | |||
30 | u16 clk; | 30 | u16 clk; |
31 | unsigned long timeout; | 31 | unsigned long timeout; |
32 | 32 | ||
33 | if (clock == host->clock) | 33 | host->mmc->actual_clock = 0; |
34 | return; | ||
35 | 34 | ||
36 | sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); | 35 | sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL); |
37 | 36 | ||
38 | if (clock == 0) | 37 | if (clock == 0) |
39 | goto out; | 38 | return; |
40 | 39 | ||
41 | while (host->max_clk / div > clock) { | 40 | while (host->max_clk / div > clock) { |
42 | /* | 41 | /* |
@@ -75,13 +74,14 @@ static void sdhci_cns3xxx_set_clock(struct sdhci_host *host, unsigned int clock) | |||
75 | 74 | ||
76 | clk |= SDHCI_CLOCK_CARD_EN; | 75 | clk |= SDHCI_CLOCK_CARD_EN; |
77 | sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); | 76 | sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); |
78 | out: | ||
79 | host->clock = clock; | ||
80 | } | 77 | } |
81 | 78 | ||
82 | static const struct sdhci_ops sdhci_cns3xxx_ops = { | 79 | static const struct sdhci_ops sdhci_cns3xxx_ops = { |
83 | .get_max_clock = sdhci_cns3xxx_get_max_clk, | 80 | .get_max_clock = sdhci_cns3xxx_get_max_clk, |
84 | .set_clock = sdhci_cns3xxx_set_clock, | 81 | .set_clock = sdhci_cns3xxx_set_clock, |
82 | .set_bus_width = sdhci_set_bus_width, | ||
83 | .reset = sdhci_reset, | ||
84 | .set_uhs_signaling = sdhci_set_uhs_signaling, | ||
85 | }; | 85 | }; |
86 | 86 | ||
87 | static const struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { | 87 | static const struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { |
@@ -90,8 +90,7 @@ static const struct sdhci_pltfm_data sdhci_cns3xxx_pdata = { | |||
90 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | | 90 | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | |
91 | SDHCI_QUIRK_INVERTED_WRITE_PROTECT | | 91 | SDHCI_QUIRK_INVERTED_WRITE_PROTECT | |
92 | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | | 92 | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | |
93 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | | 93 | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL, |
94 | SDHCI_QUIRK_NONSTANDARD_CLOCK, | ||
95 | }; | 94 | }; |
96 | 95 | ||
97 | static int sdhci_cns3xxx_probe(struct platform_device *pdev) | 96 | static int sdhci_cns3xxx_probe(struct platform_device *pdev) |