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-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
"MMC core:
- Avoid bitfield RMW for claim/retune flags

MMC host:
- dw_mmc-rockchip: Fix runtime PM support for internal phase support
- mmci: Fix device_node reference leak in of_get_dml_pipe_index()
- sdhci-brcmstb: Use correct register offset for V1 pin_sel restore"

* tag 'mmc-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: core: Avoid bitfield RMW for claim/retune flags
mmc: sdhci-brcmstb: use correct register offset for V1 pin_sel restore
mmc: dw_mmc-rockchip: Fix runtime PM support for internal phase support
mmc: mmci: Fix device_node reference leak in of_get_dml_pipe_index()

+44 -6
+37 -1
drivers/mmc/host/dw_mmc-rockchip.c
··· 36 36 int default_sample_phase; 37 37 int num_phases; 38 38 bool internal_phase; 39 + int sample_phase; 40 + int drv_phase; 39 41 }; 40 42 41 43 /* ··· 575 573 dw_mci_pltfm_remove(pdev); 576 574 } 577 575 576 + static int dw_mci_rockchip_runtime_suspend(struct device *dev) 577 + { 578 + struct platform_device *pdev = to_platform_device(dev); 579 + struct dw_mci *host = platform_get_drvdata(pdev); 580 + struct dw_mci_rockchip_priv_data *priv = host->priv; 581 + 582 + if (priv->internal_phase) { 583 + priv->sample_phase = rockchip_mmc_get_phase(host, true); 584 + priv->drv_phase = rockchip_mmc_get_phase(host, false); 585 + } 586 + 587 + return dw_mci_runtime_suspend(dev); 588 + } 589 + 590 + static int dw_mci_rockchip_runtime_resume(struct device *dev) 591 + { 592 + struct platform_device *pdev = to_platform_device(dev); 593 + struct dw_mci *host = platform_get_drvdata(pdev); 594 + struct dw_mci_rockchip_priv_data *priv = host->priv; 595 + int ret; 596 + 597 + ret = dw_mci_runtime_resume(dev); 598 + if (ret) 599 + return ret; 600 + 601 + if (priv->internal_phase) { 602 + rockchip_mmc_set_phase(host, true, priv->sample_phase); 603 + rockchip_mmc_set_phase(host, false, priv->drv_phase); 604 + mci_writel(host, MISC_CON, MEM_CLK_AUTOGATE_ENABLE); 605 + } 606 + 607 + return ret; 608 + } 609 + 578 610 static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { 579 611 SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 580 - RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL) 612 + RUNTIME_PM_OPS(dw_mci_rockchip_runtime_suspend, dw_mci_rockchip_runtime_resume, NULL) 581 613 }; 582 614 583 615 static struct platform_driver dw_mci_rockchip_pltfm_driver = {
+1
drivers/mmc/host/mmci_qcom_dml.c
··· 109 109 &dma_spec)) 110 110 return -ENODEV; 111 111 112 + of_node_put(dma_spec.np); 112 113 if (dma_spec.args_count) 113 114 return dma_spec.args[0]; 114 115
+1 -1
drivers/mmc/host/sdhci-brcmstb.c
··· 116 116 writel(sr->boot_main_ctl, priv->boot_regs + SDIO_BOOT_MAIN_CTL); 117 117 118 118 if (ver == SDIO_CFG_CORE_V1) { 119 - writel(sr->sd_pin_sel, cr + SDIO_CFG_SD_PIN_SEL); 119 + writel(sr->sd_pin_sel, cr + SDIO_CFG_V1_SD_PIN_SEL); 120 120 return; 121 121 } 122 122
+5 -4
include/linux/mmc/host.h
··· 486 486 487 487 struct mmc_ios ios; /* current io bus settings */ 488 488 489 + bool claimed; /* host exclusively claimed */ 490 + 489 491 /* group bitfields together to minimize padding */ 490 492 unsigned int use_spi_crc:1; 491 - unsigned int claimed:1; /* host exclusively claimed */ 492 493 unsigned int doing_init_tune:1; /* initial tuning in progress */ 493 - unsigned int can_retune:1; /* re-tuning can be used */ 494 494 unsigned int doing_retune:1; /* re-tuning in progress */ 495 - unsigned int retune_now:1; /* do re-tuning at next req */ 496 - unsigned int retune_paused:1; /* re-tuning is temporarily disabled */ 497 495 unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */ 498 496 unsigned int can_dma_map_merge:1; /* merging can be used */ 499 497 unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */ ··· 506 508 int rescan_disable; /* disable card detection */ 507 509 int rescan_entered; /* used with nonremovable devices */ 508 510 511 + bool can_retune; /* re-tuning can be used */ 512 + bool retune_now; /* do re-tuning at next req */ 513 + bool retune_paused; /* re-tuning is temporarily disabled */ 509 514 int need_retune; /* re-tuning is needed */ 510 515 int hold_retune; /* hold off re-tuning */ 511 516 unsigned int retune_period; /* re-tuning period in secs */