diff options
| -rw-r--r-- | Documentation/devicetree/bindings/mmc/sdhci-spear.txt | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-spear.c | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-spear.txt b/Documentation/devicetree/bindings/mmc/sdhci-spear.txt index 84d6e297908f..fd3643e7e467 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-spear.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-spear.txt | |||
| @@ -9,13 +9,10 @@ Required properties: | |||
| 9 | Optional properties: | 9 | Optional properties: |
| 10 | - cd-gpios: card detect gpio, with zero flags. | 10 | - cd-gpios: card detect gpio, with zero flags. |
| 11 | 11 | ||
| 12 | If your board don't support these gpios then don't pass the entry. | ||
| 13 | |||
| 14 | Example: | 12 | Example: |
| 15 | 13 | ||
| 16 | sdhci@fc000000 { | 14 | sdhci@fc000000 { |
| 17 | compatible = "st,spear300-sdhci"; | 15 | compatible = "st,spear300-sdhci"; |
| 18 | reg = <0xfc000000 0x1000>; | 16 | reg = <0xfc000000 0x1000>; |
| 19 | 17 | cd-gpios = <&gpio0 6 0>; | |
| 20 | cd-gpios = <&gpio0 6 0> | ||
| 21 | }; | 18 | }; |
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index ecad282741d6..6be89c032deb 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c | |||
| @@ -140,7 +140,7 @@ static int __devinit sdhci_probe(struct platform_device *pdev) | |||
| 140 | goto err; | 140 | goto err; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | ret = clk_enable(sdhci->clk); | 143 | ret = clk_prepare_enable(sdhci->clk); |
| 144 | if (ret) { | 144 | if (ret) { |
| 145 | dev_dbg(&pdev->dev, "Error enabling clock\n"); | 145 | dev_dbg(&pdev->dev, "Error enabling clock\n"); |
| 146 | goto put_clk; | 146 | goto put_clk; |
| @@ -260,7 +260,7 @@ set_drvdata: | |||
| 260 | free_host: | 260 | free_host: |
| 261 | sdhci_free_host(host); | 261 | sdhci_free_host(host); |
| 262 | disable_clk: | 262 | disable_clk: |
| 263 | clk_disable(sdhci->clk); | 263 | clk_disable_unprepare(sdhci->clk); |
| 264 | put_clk: | 264 | put_clk: |
| 265 | clk_put(sdhci->clk); | 265 | clk_put(sdhci->clk); |
| 266 | err: | 266 | err: |
| @@ -282,7 +282,7 @@ static int __devexit sdhci_remove(struct platform_device *pdev) | |||
| 282 | 282 | ||
| 283 | sdhci_remove_host(host, dead); | 283 | sdhci_remove_host(host, dead); |
| 284 | sdhci_free_host(host); | 284 | sdhci_free_host(host); |
| 285 | clk_disable(sdhci->clk); | 285 | clk_disable_unprepare(sdhci->clk); |
| 286 | clk_put(sdhci->clk); | 286 | clk_put(sdhci->clk); |
| 287 | 287 | ||
| 288 | return 0; | 288 | return 0; |
| @@ -297,7 +297,7 @@ static int sdhci_suspend(struct device *dev) | |||
| 297 | 297 | ||
| 298 | ret = sdhci_suspend_host(host); | 298 | ret = sdhci_suspend_host(host); |
| 299 | if (!ret) | 299 | if (!ret) |
| 300 | clk_disable(sdhci->clk); | 300 | clk_disable_unprepare(sdhci->clk); |
| 301 | 301 | ||
| 302 | return ret; | 302 | return ret; |
| 303 | } | 303 | } |
| @@ -308,7 +308,7 @@ static int sdhci_resume(struct device *dev) | |||
| 308 | struct spear_sdhci *sdhci = dev_get_platdata(dev); | 308 | struct spear_sdhci *sdhci = dev_get_platdata(dev); |
| 309 | int ret; | 309 | int ret; |
| 310 | 310 | ||
| 311 | ret = clk_enable(sdhci->clk); | 311 | ret = clk_prepare_enable(sdhci->clk); |
| 312 | if (ret) { | 312 | if (ret) { |
| 313 | dev_dbg(dev, "Resume: Error enabling clock\n"); | 313 | dev_dbg(dev, "Resume: Error enabling clock\n"); |
| 314 | return ret; | 314 | return ret; |
