diff options
author | David S. Miller <davem@davemloft.net> | 2019-09-15 08:17:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-15 08:17:27 -0400 |
commit | aa2eaa8c272a3211dec07ce9c6c863a7e355c10e (patch) | |
tree | 8454a23d36b2ff36133c276ee0ba80eabc00850e /drivers/mmc | |
parent | a3d3c74da49c65fc63a937fa559186b0e16adca3 (diff) | |
parent | 1609d7604b847a9820e63393d1a3b6cac7286d40 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor overlapping changes in the btusb and ixgbe drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/mmc_ops.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/bcm2835.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_core.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci-o2micro.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 1 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc_core.c | 27 | ||||
-rw-r--r-- | drivers/mmc/host/uniphier-sd.c | 3 |
8 files changed, 18 insertions, 30 deletions
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 74e4364bc9fb..09113b9ad679 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c | |||
@@ -564,7 +564,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, | |||
564 | if (index == EXT_CSD_SANITIZE_START) | 564 | if (index == EXT_CSD_SANITIZE_START) |
565 | cmd.sanitize_busy = true; | 565 | cmd.sanitize_busy = true; |
566 | 566 | ||
567 | err = mmc_wait_for_cmd(host, &cmd, 0); | 567 | err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES); |
568 | if (err) | 568 | if (err) |
569 | goto out; | 569 | goto out; |
570 | 570 | ||
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 7e0d3a49c06d..bb31e13648d6 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c | |||
@@ -597,7 +597,7 @@ static void bcm2835_finish_request(struct bcm2835_host *host) | |||
597 | struct dma_chan *terminate_chan = NULL; | 597 | struct dma_chan *terminate_chan = NULL; |
598 | struct mmc_request *mrq; | 598 | struct mmc_request *mrq; |
599 | 599 | ||
600 | cancel_delayed_work_sync(&host->timeout_work); | 600 | cancel_delayed_work(&host->timeout_work); |
601 | 601 | ||
602 | mrq = host->mrq; | 602 | mrq = host->mrq; |
603 | 603 | ||
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 64d3b5fb7fe5..4a2872f49a60 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c | |||
@@ -774,8 +774,6 @@ int renesas_sdhi_probe(struct platform_device *pdev, | |||
774 | /* All SDHI have SDIO status bits which must be 1 */ | 774 | /* All SDHI have SDIO status bits which must be 1 */ |
775 | mmc_data->flags |= TMIO_MMC_SDIO_STATUS_SETBITS; | 775 | mmc_data->flags |= TMIO_MMC_SDIO_STATUS_SETBITS; |
776 | 776 | ||
777 | pm_runtime_enable(&pdev->dev); | ||
778 | |||
779 | ret = renesas_sdhi_clk_enable(host); | 777 | ret = renesas_sdhi_clk_enable(host); |
780 | if (ret) | 778 | if (ret) |
781 | goto efree; | 779 | goto efree; |
@@ -856,8 +854,6 @@ edisclk: | |||
856 | efree: | 854 | efree: |
857 | tmio_mmc_host_free(host); | 855 | tmio_mmc_host_free(host); |
858 | 856 | ||
859 | pm_runtime_disable(&pdev->dev); | ||
860 | |||
861 | return ret; | 857 | return ret; |
862 | } | 858 | } |
863 | EXPORT_SYMBOL_GPL(renesas_sdhi_probe); | 859 | EXPORT_SYMBOL_GPL(renesas_sdhi_probe); |
@@ -869,8 +865,6 @@ int renesas_sdhi_remove(struct platform_device *pdev) | |||
869 | tmio_mmc_host_remove(host); | 865 | tmio_mmc_host_remove(host); |
870 | renesas_sdhi_clk_disable(host); | 866 | renesas_sdhi_clk_disable(host); |
871 | 867 | ||
872 | pm_runtime_disable(&pdev->dev); | ||
873 | |||
874 | return 0; | 868 | return 0; |
875 | } | 869 | } |
876 | EXPORT_SYMBOL_GPL(renesas_sdhi_remove); | 870 | EXPORT_SYMBOL_GPL(renesas_sdhi_remove); |
diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c index 9dc4548271b4..19944b0049db 100644 --- a/drivers/mmc/host/sdhci-pci-o2micro.c +++ b/drivers/mmc/host/sdhci-pci-o2micro.c | |||
@@ -432,7 +432,6 @@ int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot) | |||
432 | mmc_hostname(host->mmc)); | 432 | mmc_hostname(host->mmc)); |
433 | host->flags &= ~SDHCI_SIGNALING_330; | 433 | host->flags &= ~SDHCI_SIGNALING_330; |
434 | host->flags |= SDHCI_SIGNALING_180; | 434 | host->flags |= SDHCI_SIGNALING_180; |
435 | host->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD; | ||
436 | host->mmc->caps2 |= MMC_CAP2_NO_SD; | 435 | host->mmc->caps2 |= MMC_CAP2_NO_SD; |
437 | host->mmc->caps2 |= MMC_CAP2_NO_SDIO; | 436 | host->mmc->caps2 |= MMC_CAP2_NO_SDIO; |
438 | pci_write_config_dword(chip->pdev, | 437 | pci_write_config_dword(chip->pdev, |
@@ -682,6 +681,7 @@ static const struct sdhci_ops sdhci_pci_o2_ops = { | |||
682 | const struct sdhci_pci_fixes sdhci_o2 = { | 681 | const struct sdhci_pci_fixes sdhci_o2 = { |
683 | .probe = sdhci_pci_o2_probe, | 682 | .probe = sdhci_pci_o2_probe, |
684 | .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, | 683 | .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, |
684 | .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, | ||
685 | .probe_slot = sdhci_pci_o2_probe_slot, | 685 | .probe_slot = sdhci_pci_o2_probe_slot, |
686 | #ifdef CONFIG_PM_SLEEP | 686 | #ifdef CONFIG_PM_SLEEP |
687 | .resume = sdhci_pci_o2_resume, | 687 | .resume = sdhci_pci_o2_resume, |
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 8539e10784b4..93e83ad25976 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c | |||
@@ -172,8 +172,6 @@ static int tmio_mmc_probe(struct platform_device *pdev) | |||
172 | host->mmc->f_max = pdata->hclk; | 172 | host->mmc->f_max = pdata->hclk; |
173 | host->mmc->f_min = pdata->hclk / 512; | 173 | host->mmc->f_min = pdata->hclk / 512; |
174 | 174 | ||
175 | pm_runtime_enable(&pdev->dev); | ||
176 | |||
177 | ret = tmio_mmc_host_probe(host); | 175 | ret = tmio_mmc_host_probe(host); |
178 | if (ret) | 176 | if (ret) |
179 | goto host_free; | 177 | goto host_free; |
@@ -193,7 +191,6 @@ host_remove: | |||
193 | tmio_mmc_host_remove(host); | 191 | tmio_mmc_host_remove(host); |
194 | host_free: | 192 | host_free: |
195 | tmio_mmc_host_free(host); | 193 | tmio_mmc_host_free(host); |
196 | pm_runtime_disable(&pdev->dev); | ||
197 | cell_disable: | 194 | cell_disable: |
198 | if (cell->disable) | 195 | if (cell->disable) |
199 | cell->disable(pdev); | 196 | cell->disable(pdev); |
@@ -210,8 +207,6 @@ static int tmio_mmc_remove(struct platform_device *pdev) | |||
210 | if (cell->disable) | 207 | if (cell->disable) |
211 | cell->disable(pdev); | 208 | cell->disable(pdev); |
212 | 209 | ||
213 | pm_runtime_disable(&pdev->dev); | ||
214 | |||
215 | return 0; | 210 | return 0; |
216 | } | 211 | } |
217 | 212 | ||
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index c5ba13fae399..2f0b092d6dcc 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -163,6 +163,7 @@ struct tmio_mmc_host { | |||
163 | unsigned long last_req_ts; | 163 | unsigned long last_req_ts; |
164 | struct mutex ios_lock; /* protect set_ios() context */ | 164 | struct mutex ios_lock; /* protect set_ios() context */ |
165 | bool native_hotplug; | 165 | bool native_hotplug; |
166 | bool runtime_synced; | ||
166 | bool sdio_irq_enabled; | 167 | bool sdio_irq_enabled; |
167 | 168 | ||
168 | /* Mandatory callback */ | 169 | /* Mandatory callback */ |
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 2cb3f951c3e2..9b6e1001e77c 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c | |||
@@ -1153,15 +1153,6 @@ void tmio_mmc_host_free(struct tmio_mmc_host *host) | |||
1153 | } | 1153 | } |
1154 | EXPORT_SYMBOL_GPL(tmio_mmc_host_free); | 1154 | EXPORT_SYMBOL_GPL(tmio_mmc_host_free); |
1155 | 1155 | ||
1156 | /** | ||
1157 | * tmio_mmc_host_probe() - Common probe for all implementations | ||
1158 | * @_host: Host to probe | ||
1159 | * | ||
1160 | * Perform tasks common to all implementations probe functions. | ||
1161 | * | ||
1162 | * The caller should have called pm_runtime_enable() prior to calling | ||
1163 | * the common probe function. | ||
1164 | */ | ||
1165 | int tmio_mmc_host_probe(struct tmio_mmc_host *_host) | 1156 | int tmio_mmc_host_probe(struct tmio_mmc_host *_host) |
1166 | { | 1157 | { |
1167 | struct platform_device *pdev = _host->pdev; | 1158 | struct platform_device *pdev = _host->pdev; |
@@ -1257,19 +1248,22 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host) | |||
1257 | /* See if we also get DMA */ | 1248 | /* See if we also get DMA */ |
1258 | tmio_mmc_request_dma(_host, pdata); | 1249 | tmio_mmc_request_dma(_host, pdata); |
1259 | 1250 | ||
1260 | pm_runtime_set_active(&pdev->dev); | ||
1261 | pm_runtime_set_autosuspend_delay(&pdev->dev, 50); | 1251 | pm_runtime_set_autosuspend_delay(&pdev->dev, 50); |
1262 | pm_runtime_use_autosuspend(&pdev->dev); | 1252 | pm_runtime_use_autosuspend(&pdev->dev); |
1253 | pm_runtime_enable(&pdev->dev); | ||
1254 | pm_runtime_get_sync(&pdev->dev); | ||
1263 | 1255 | ||
1264 | ret = mmc_add_host(mmc); | 1256 | ret = mmc_add_host(mmc); |
1265 | if (ret) | 1257 | if (ret) |
1266 | goto remove_host; | 1258 | goto remove_host; |
1267 | 1259 | ||
1268 | dev_pm_qos_expose_latency_limit(&pdev->dev, 100); | 1260 | dev_pm_qos_expose_latency_limit(&pdev->dev, 100); |
1261 | pm_runtime_put(&pdev->dev); | ||
1269 | 1262 | ||
1270 | return 0; | 1263 | return 0; |
1271 | 1264 | ||
1272 | remove_host: | 1265 | remove_host: |
1266 | pm_runtime_put_noidle(&pdev->dev); | ||
1273 | tmio_mmc_host_remove(_host); | 1267 | tmio_mmc_host_remove(_host); |
1274 | return ret; | 1268 | return ret; |
1275 | } | 1269 | } |
@@ -1280,12 +1274,11 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) | |||
1280 | struct platform_device *pdev = host->pdev; | 1274 | struct platform_device *pdev = host->pdev; |
1281 | struct mmc_host *mmc = host->mmc; | 1275 | struct mmc_host *mmc = host->mmc; |
1282 | 1276 | ||
1277 | pm_runtime_get_sync(&pdev->dev); | ||
1278 | |||
1283 | if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) | 1279 | if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) |
1284 | sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000); | 1280 | sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000); |
1285 | 1281 | ||
1286 | if (!host->native_hotplug) | ||
1287 | pm_runtime_get_sync(&pdev->dev); | ||
1288 | |||
1289 | dev_pm_qos_hide_latency_limit(&pdev->dev); | 1282 | dev_pm_qos_hide_latency_limit(&pdev->dev); |
1290 | 1283 | ||
1291 | mmc_remove_host(mmc); | 1284 | mmc_remove_host(mmc); |
@@ -1294,7 +1287,10 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) | |||
1294 | tmio_mmc_release_dma(host); | 1287 | tmio_mmc_release_dma(host); |
1295 | 1288 | ||
1296 | pm_runtime_dont_use_autosuspend(&pdev->dev); | 1289 | pm_runtime_dont_use_autosuspend(&pdev->dev); |
1290 | if (host->native_hotplug) | ||
1291 | pm_runtime_put_noidle(&pdev->dev); | ||
1297 | pm_runtime_put_sync(&pdev->dev); | 1292 | pm_runtime_put_sync(&pdev->dev); |
1293 | pm_runtime_disable(&pdev->dev); | ||
1298 | } | 1294 | } |
1299 | EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); | 1295 | EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); |
1300 | 1296 | ||
@@ -1337,6 +1333,11 @@ int tmio_mmc_host_runtime_resume(struct device *dev) | |||
1337 | { | 1333 | { |
1338 | struct tmio_mmc_host *host = dev_get_drvdata(dev); | 1334 | struct tmio_mmc_host *host = dev_get_drvdata(dev); |
1339 | 1335 | ||
1336 | if (!host->runtime_synced) { | ||
1337 | host->runtime_synced = true; | ||
1338 | return 0; | ||
1339 | } | ||
1340 | |||
1340 | tmio_mmc_clk_enable(host); | 1341 | tmio_mmc_clk_enable(host); |
1341 | tmio_mmc_hw_reset(host->mmc); | 1342 | tmio_mmc_hw_reset(host->mmc); |
1342 | 1343 | ||
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c index 49aad9a79c18..91a2be41edf6 100644 --- a/drivers/mmc/host/uniphier-sd.c +++ b/drivers/mmc/host/uniphier-sd.c | |||
@@ -631,7 +631,6 @@ static int uniphier_sd_probe(struct platform_device *pdev) | |||
631 | host->clk_disable = uniphier_sd_clk_disable; | 631 | host->clk_disable = uniphier_sd_clk_disable; |
632 | host->set_clock = uniphier_sd_set_clock; | 632 | host->set_clock = uniphier_sd_set_clock; |
633 | 633 | ||
634 | pm_runtime_enable(&pdev->dev); | ||
635 | ret = uniphier_sd_clk_enable(host); | 634 | ret = uniphier_sd_clk_enable(host); |
636 | if (ret) | 635 | if (ret) |
637 | goto free_host; | 636 | goto free_host; |
@@ -653,7 +652,6 @@ static int uniphier_sd_probe(struct platform_device *pdev) | |||
653 | 652 | ||
654 | free_host: | 653 | free_host: |
655 | tmio_mmc_host_free(host); | 654 | tmio_mmc_host_free(host); |
656 | pm_runtime_disable(&pdev->dev); | ||
657 | 655 | ||
658 | return ret; | 656 | return ret; |
659 | } | 657 | } |
@@ -664,7 +662,6 @@ static int uniphier_sd_remove(struct platform_device *pdev) | |||
664 | 662 | ||
665 | tmio_mmc_host_remove(host); | 663 | tmio_mmc_host_remove(host); |
666 | uniphier_sd_clk_disable(host); | 664 | uniphier_sd_clk_disable(host); |
667 | pm_runtime_disable(&pdev->dev); | ||
668 | 665 | ||
669 | return 0; | 666 | return 0; |
670 | } | 667 | } |