diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-of.c')
| -rw-r--r-- | drivers/mmc/host/sdhci-of.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-of.c b/drivers/mmc/host/sdhci-of.c index d79fa55c3b89..1e8aa590bb39 100644 --- a/drivers/mmc/host/sdhci-of.c +++ b/drivers/mmc/host/sdhci-of.c | |||
| @@ -158,6 +158,13 @@ static unsigned int esdhc_get_max_clock(struct sdhci_host *host) | |||
| 158 | return of_host->clock; | 158 | return of_host->clock; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | static unsigned int esdhc_get_min_clock(struct sdhci_host *host) | ||
| 162 | { | ||
| 163 | struct sdhci_of_host *of_host = sdhci_priv(host); | ||
| 164 | |||
| 165 | return of_host->clock / 256 / 16; | ||
| 166 | } | ||
| 167 | |||
| 161 | static unsigned int esdhc_get_timeout_clock(struct sdhci_host *host) | 168 | static unsigned int esdhc_get_timeout_clock(struct sdhci_host *host) |
| 162 | { | 169 | { |
| 163 | struct sdhci_of_host *of_host = sdhci_priv(host); | 170 | struct sdhci_of_host *of_host = sdhci_priv(host); |
| @@ -184,6 +191,7 @@ static struct sdhci_of_data sdhci_esdhc = { | |||
| 184 | .set_clock = esdhc_set_clock, | 191 | .set_clock = esdhc_set_clock, |
| 185 | .enable_dma = esdhc_enable_dma, | 192 | .enable_dma = esdhc_enable_dma, |
| 186 | .get_max_clock = esdhc_get_max_clock, | 193 | .get_max_clock = esdhc_get_max_clock, |
| 194 | .get_min_clock = esdhc_get_min_clock, | ||
| 187 | .get_timeout_clock = esdhc_get_timeout_clock, | 195 | .get_timeout_clock = esdhc_get_timeout_clock, |
| 188 | }, | 196 | }, |
| 189 | }; | 197 | }; |
| @@ -226,7 +234,7 @@ static int __devinit sdhci_of_probe(struct of_device *ofdev, | |||
| 226 | return -ENODEV; | 234 | return -ENODEV; |
| 227 | 235 | ||
| 228 | host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host)); | 236 | host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host)); |
| 229 | if (!host) | 237 | if (IS_ERR(host)) |
| 230 | return -ENOMEM; | 238 | return -ENOMEM; |
| 231 | 239 | ||
| 232 | of_host = sdhci_priv(host); | 240 | of_host = sdhci_priv(host); |
