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.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
"A couple of MMC fixes:

MMC core:
- Fixup condition for CMD13 polling for RPMB requests

MMC host:
- mtk-sd: Fix system suspend/resume support for CQHCI
- mtd-sd: Extend SDIO IRQ fix to more variants
- sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
- tmio: Bring HW to a sane state after a power off"

* tag 'mmc-v5.10-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: mediatek: mark PM functions as __maybe_unused
mmc: block: Fixup condition for CMD13 polling for RPMB requests
mmc: tmio: improve bringing HW to a sane state with MMC_POWER_OFF
mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
mmc: mediatek: Extend recheck_sdio_irq fix to more variants
mmc: mediatek: Fix system suspend/resume support for CQHCI

+35 -15
+1 -1
drivers/mmc/core/block.c
··· 580 580 581 581 memcpy(&(idata->ic.response), cmd.resp, sizeof(cmd.resp)); 582 582 583 - if (idata->rpmb || (cmd.flags & MMC_RSP_R1B)) { 583 + if (idata->rpmb || (cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { 584 584 /* 585 585 * Ensure RPMB/R1B command has completed by polling CMD13 586 586 * "Send Status".
+28 -11
drivers/mmc/host/mtk-sd.c
··· 446 446 447 447 static const struct mtk_mmc_compatible mt8135_compat = { 448 448 .clk_div_bits = 8, 449 - .recheck_sdio_irq = false, 449 + .recheck_sdio_irq = true, 450 450 .hs400_tune = false, 451 451 .pad_tune_reg = MSDC_PAD_TUNE, 452 452 .async_fifo = false, ··· 485 485 486 486 static const struct mtk_mmc_compatible mt2701_compat = { 487 487 .clk_div_bits = 12, 488 - .recheck_sdio_irq = false, 488 + .recheck_sdio_irq = true, 489 489 .hs400_tune = false, 490 490 .pad_tune_reg = MSDC_PAD_TUNE0, 491 491 .async_fifo = true, ··· 511 511 512 512 static const struct mtk_mmc_compatible mt7622_compat = { 513 513 .clk_div_bits = 12, 514 - .recheck_sdio_irq = false, 514 + .recheck_sdio_irq = true, 515 515 .hs400_tune = false, 516 516 .pad_tune_reg = MSDC_PAD_TUNE0, 517 517 .async_fifo = true, ··· 524 524 525 525 static const struct mtk_mmc_compatible mt8516_compat = { 526 526 .clk_div_bits = 12, 527 - .recheck_sdio_irq = false, 527 + .recheck_sdio_irq = true, 528 528 .hs400_tune = false, 529 529 .pad_tune_reg = MSDC_PAD_TUNE0, 530 530 .async_fifo = true, ··· 535 535 536 536 static const struct mtk_mmc_compatible mt7620_compat = { 537 537 .clk_div_bits = 8, 538 - .recheck_sdio_irq = false, 538 + .recheck_sdio_irq = true, 539 539 .hs400_tune = false, 540 540 .pad_tune_reg = MSDC_PAD_TUNE, 541 541 .async_fifo = false, ··· 548 548 549 549 static const struct mtk_mmc_compatible mt6779_compat = { 550 550 .clk_div_bits = 12, 551 + .recheck_sdio_irq = false, 551 552 .hs400_tune = false, 552 553 .pad_tune_reg = MSDC_PAD_TUNE0, 553 554 .async_fifo = true, ··· 2604 2603 return 0; 2605 2604 } 2606 2605 2607 - #ifdef CONFIG_PM 2608 2606 static void msdc_save_reg(struct msdc_host *host) 2609 2607 { 2610 2608 u32 tune_reg = host->dev_comp->pad_tune_reg; ··· 2662 2662 __msdc_enable_sdio_irq(host, 1); 2663 2663 } 2664 2664 2665 - static int msdc_runtime_suspend(struct device *dev) 2665 + static int __maybe_unused msdc_runtime_suspend(struct device *dev) 2666 2666 { 2667 2667 struct mmc_host *mmc = dev_get_drvdata(dev); 2668 2668 struct msdc_host *host = mmc_priv(mmc); ··· 2672 2672 return 0; 2673 2673 } 2674 2674 2675 - static int msdc_runtime_resume(struct device *dev) 2675 + static int __maybe_unused msdc_runtime_resume(struct device *dev) 2676 2676 { 2677 2677 struct mmc_host *mmc = dev_get_drvdata(dev); 2678 2678 struct msdc_host *host = mmc_priv(mmc); ··· 2681 2681 msdc_restore_reg(host); 2682 2682 return 0; 2683 2683 } 2684 - #endif 2684 + 2685 + static int __maybe_unused msdc_suspend(struct device *dev) 2686 + { 2687 + struct mmc_host *mmc = dev_get_drvdata(dev); 2688 + int ret; 2689 + 2690 + if (mmc->caps2 & MMC_CAP2_CQE) { 2691 + ret = cqhci_suspend(mmc); 2692 + if (ret) 2693 + return ret; 2694 + } 2695 + 2696 + return pm_runtime_force_suspend(dev); 2697 + } 2698 + 2699 + static int __maybe_unused msdc_resume(struct device *dev) 2700 + { 2701 + return pm_runtime_force_resume(dev); 2702 + } 2685 2703 2686 2704 static const struct dev_pm_ops msdc_dev_pm_ops = { 2687 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 2688 - pm_runtime_force_resume) 2705 + SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume) 2689 2706 SET_RUNTIME_PM_OPS(msdc_runtime_suspend, msdc_runtime_resume, NULL) 2690 2707 }; 2691 2708
+3
drivers/mmc/host/sdhci-of-arasan.c
··· 1186 1186 static struct sdhci_arasan_of_data intel_keembay_emmc_data = { 1187 1187 .soc_ctl_map = &intel_keembay_soc_ctl_map, 1188 1188 .pdata = &sdhci_keembay_emmc_pdata, 1189 + .clk_ops = &arasan_clk_ops, 1189 1190 }; 1190 1191 1191 1192 static struct sdhci_arasan_of_data intel_keembay_sd_data = { 1192 1193 .soc_ctl_map = &intel_keembay_soc_ctl_map, 1193 1194 .pdata = &sdhci_keembay_sd_pdata, 1195 + .clk_ops = &arasan_clk_ops, 1194 1196 }; 1195 1197 1196 1198 static struct sdhci_arasan_of_data intel_keembay_sdio_data = { 1197 1199 .soc_ctl_map = &intel_keembay_soc_ctl_map, 1198 1200 .pdata = &sdhci_keembay_sdio_pdata, 1201 + .clk_ops = &arasan_clk_ops, 1199 1202 }; 1200 1203 1201 1204 static const struct of_device_id sdhci_arasan_of_match[] = {
+3 -3
drivers/mmc/host/tmio_mmc_core.c
··· 927 927 switch (ios->power_mode) { 928 928 case MMC_POWER_OFF: 929 929 tmio_mmc_power_off(host); 930 - /* Downgrade ensures a sane state for tuning HW (e.g. SCC) */ 931 - if (host->mmc->ops->hs400_downgrade) 932 - host->mmc->ops->hs400_downgrade(host->mmc); 930 + /* For R-Car Gen2+, we need to reset SDHI specific SCC */ 931 + if (host->pdata->flags & TMIO_MMC_MIN_RCAR2) 932 + host->reset(host); 933 933 host->set_clock(host, 0); 934 934 break; 935 935 case MMC_POWER_UP: