Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mmc-v5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:

- tmio: Fixup runtime PM management during probe and remove

- sdhci-pci-o2micro: Fix eMMC initialization for an AMD SoC

- bcm2835: Prevent lockups when terminating work

* tag 'mmc-v5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: tmio: Fixup runtime PM management during remove
mmc: tmio: Fixup runtime PM management during probe
Revert "mmc: tmio: move runtime PM enablement to the driver implementations"
Revert "mmc: sdhci: Remove unneeded quirk2 flag of O2 SD host controller"
Revert "mmc: bcm2835: Terminate timeout work synchronously"

+17 -29
+1 -1
drivers/mmc/host/bcm2835.c
··· 597 597 struct dma_chan *terminate_chan = NULL; 598 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 602 mrq = host->mrq; 603 603
-6
drivers/mmc/host/renesas_sdhi_core.c
··· 774 774 /* All SDHI have SDIO status bits which must be 1 */ 775 775 mmc_data->flags |= TMIO_MMC_SDIO_STATUS_SETBITS; 776 776 777 - pm_runtime_enable(&pdev->dev); 778 - 779 777 ret = renesas_sdhi_clk_enable(host); 780 778 if (ret) 781 779 goto efree; ··· 854 856 efree: 855 857 tmio_mmc_host_free(host); 856 858 857 - pm_runtime_disable(&pdev->dev); 858 - 859 859 return ret; 860 860 } 861 861 EXPORT_SYMBOL_GPL(renesas_sdhi_probe); ··· 864 868 865 869 tmio_mmc_host_remove(host); 866 870 renesas_sdhi_clk_disable(host); 867 - 868 - pm_runtime_disable(&pdev->dev); 869 871 870 872 return 0; 871 873 }
+1 -1
drivers/mmc/host/sdhci-pci-o2micro.c
··· 432 432 mmc_hostname(host->mmc)); 433 433 host->flags &= ~SDHCI_SIGNALING_330; 434 434 host->flags |= SDHCI_SIGNALING_180; 435 - host->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD; 436 435 host->mmc->caps2 |= MMC_CAP2_NO_SD; 437 436 host->mmc->caps2 |= MMC_CAP2_NO_SDIO; 438 437 pci_write_config_dword(chip->pdev, ··· 681 682 const struct sdhci_pci_fixes sdhci_o2 = { 682 683 .probe = sdhci_pci_o2_probe, 683 684 .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, 685 + .quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD, 684 686 .probe_slot = sdhci_pci_o2_probe_slot, 685 687 #ifdef CONFIG_PM_SLEEP 686 688 .resume = sdhci_pci_o2_resume,
-5
drivers/mmc/host/tmio_mmc.c
··· 172 172 host->mmc->f_max = pdata->hclk; 173 173 host->mmc->f_min = pdata->hclk / 512; 174 174 175 - pm_runtime_enable(&pdev->dev); 176 - 177 175 ret = tmio_mmc_host_probe(host); 178 176 if (ret) 179 177 goto host_free; ··· 191 193 tmio_mmc_host_remove(host); 192 194 host_free: 193 195 tmio_mmc_host_free(host); 194 - pm_runtime_disable(&pdev->dev); 195 196 cell_disable: 196 197 if (cell->disable) 197 198 cell->disable(pdev); ··· 206 209 tmio_mmc_host_remove(host); 207 210 if (cell->disable) 208 211 cell->disable(pdev); 209 - 210 - pm_runtime_disable(&pdev->dev); 211 212 212 213 return 0; 213 214 }
+1
drivers/mmc/host/tmio_mmc.h
··· 163 163 unsigned long last_req_ts; 164 164 struct mutex ios_lock; /* protect set_ios() context */ 165 165 bool native_hotplug; 166 + bool runtime_synced; 166 167 bool sdio_irq_enabled; 167 168 168 169 /* Mandatory callback */
+14 -13
drivers/mmc/host/tmio_mmc_core.c
··· 1153 1153 } 1154 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 1156 int tmio_mmc_host_probe(struct tmio_mmc_host *_host) 1166 1157 { 1167 1158 struct platform_device *pdev = _host->pdev; ··· 1248 1257 /* See if we also get DMA */ 1249 1258 tmio_mmc_request_dma(_host, pdata); 1250 1259 1251 - pm_runtime_set_active(&pdev->dev); 1252 1260 pm_runtime_set_autosuspend_delay(&pdev->dev, 50); 1253 1261 pm_runtime_use_autosuspend(&pdev->dev); 1262 + pm_runtime_enable(&pdev->dev); 1263 + pm_runtime_get_sync(&pdev->dev); 1254 1264 1255 1265 ret = mmc_add_host(mmc); 1256 1266 if (ret) 1257 1267 goto remove_host; 1258 1268 1259 1269 dev_pm_qos_expose_latency_limit(&pdev->dev, 100); 1270 + pm_runtime_put(&pdev->dev); 1260 1271 1261 1272 return 0; 1262 1273 1263 1274 remove_host: 1275 + pm_runtime_put_noidle(&pdev->dev); 1264 1276 tmio_mmc_host_remove(_host); 1265 1277 return ret; 1266 1278 } ··· 1274 1280 struct platform_device *pdev = host->pdev; 1275 1281 struct mmc_host *mmc = host->mmc; 1276 1282 1283 + pm_runtime_get_sync(&pdev->dev); 1284 + 1277 1285 if (host->pdata->flags & TMIO_MMC_SDIO_IRQ) 1278 1286 sd_ctrl_write16(host, CTL_TRANSACTION_CTL, 0x0000); 1279 - 1280 - if (!host->native_hotplug) 1281 - pm_runtime_get_sync(&pdev->dev); 1282 1287 1283 1288 dev_pm_qos_hide_latency_limit(&pdev->dev); 1284 1289 ··· 1287 1294 tmio_mmc_release_dma(host); 1288 1295 1289 1296 pm_runtime_dont_use_autosuspend(&pdev->dev); 1297 + if (host->native_hotplug) 1298 + pm_runtime_put_noidle(&pdev->dev); 1290 1299 pm_runtime_put_sync(&pdev->dev); 1300 + pm_runtime_disable(&pdev->dev); 1291 1301 } 1292 1302 EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); 1293 1303 ··· 1332 1336 int tmio_mmc_host_runtime_resume(struct device *dev) 1333 1337 { 1334 1338 struct tmio_mmc_host *host = dev_get_drvdata(dev); 1339 + 1340 + if (!host->runtime_synced) { 1341 + host->runtime_synced = true; 1342 + return 0; 1343 + } 1335 1344 1336 1345 tmio_mmc_clk_enable(host); 1337 1346 tmio_mmc_hw_reset(host->mmc);
-3
drivers/mmc/host/uniphier-sd.c
··· 631 631 host->clk_disable = uniphier_sd_clk_disable; 632 632 host->set_clock = uniphier_sd_set_clock; 633 633 634 - pm_runtime_enable(&pdev->dev); 635 634 ret = uniphier_sd_clk_enable(host); 636 635 if (ret) 637 636 goto free_host; ··· 652 653 653 654 free_host: 654 655 tmio_mmc_host_free(host); 655 - pm_runtime_disable(&pdev->dev); 656 656 657 657 return ret; 658 658 } ··· 662 664 663 665 tmio_mmc_host_remove(host); 664 666 uniphier_sd_clk_disable(host); 665 - pm_runtime_disable(&pdev->dev); 666 667 667 668 return 0; 668 669 }