diff options
| author | Takashi Iwai <[email protected]> | 2024-05-01 18:05:13 +0200 | 
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2024-05-01 18:05:13 +0200 | 
| commit | a30a7a29c35ef9d90bdec86d3051c32f47d6041f (patch) | |
| tree | 8fb47eaf32b134de050019d6205f3a3677f22d6c /drivers/mmc | |
| parent | 39815cdfc8d46ce2c72cbf2aa3d991c4bfb0024f (diff) | |
| parent | c5782bb5468acf86d8ca8e161267e8d055fb4161 (diff) | |
Merge tag 'asoc-fix-v6.9-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.9
This is much larger than is ideal, partly due to your holiday but also
due to several vendors having come in with relatively large fixes at
similar times.  It's all driver specific stuff.
The meson fixes from Jerome fix some rare timing issues with blocking
operations happening in triggers, plus the continuous clock support
which fixes clocking for some platforms.  The SOF series from Peter
builds to the fix to avoid spurious resets of ChainDMA which triggered
errors in cleanup paths with both PulseAudio and PipeWire, and there's
also some simple new debugfs files from Pierre which make support a lot
eaiser.
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/core/block.c | 4 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-of-dwcmshc.c | 28 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-omap.c | 3 | 
3 files changed, 22 insertions, 13 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 64a3492e8002..90c51b12148e 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -413,7 +413,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(  	struct mmc_blk_ioc_data *idata;  	int err; -	idata = kmalloc(sizeof(*idata), GFP_KERNEL); +	idata = kzalloc(sizeof(*idata), GFP_KERNEL);  	if (!idata) {  		err = -ENOMEM;  		goto out; @@ -488,7 +488,7 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,  	if (idata->flags & MMC_BLK_IOC_DROP)  		return 0; -	if (idata->flags & MMC_BLK_IOC_SBC) +	if (idata->flags & MMC_BLK_IOC_SBC && i > 0)  		prev_idata = idatas[i - 1];  	/* diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index ab4b964d4058..1d8f5a76096a 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -999,6 +999,17 @@ free_pltfm:  	return err;  } +static void dwcmshc_disable_card_clk(struct sdhci_host *host) +{ +	u16 ctrl; + +	ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); +	if (ctrl & SDHCI_CLOCK_CARD_EN) { +		ctrl &= ~SDHCI_CLOCK_CARD_EN; +		sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); +	} +} +  static void dwcmshc_remove(struct platform_device *pdev)  {  	struct sdhci_host *host = platform_get_drvdata(pdev); @@ -1006,8 +1017,14 @@ static void dwcmshc_remove(struct platform_device *pdev)  	struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);  	struct rk35xx_priv *rk_priv = priv->priv; +	pm_runtime_get_sync(&pdev->dev); +	pm_runtime_disable(&pdev->dev); +	pm_runtime_put_noidle(&pdev->dev); +  	sdhci_remove_host(host, 0); +	dwcmshc_disable_card_clk(host); +  	clk_disable_unprepare(pltfm_host->clk);  	clk_disable_unprepare(priv->bus_clk);  	if (rk_priv) @@ -1099,17 +1116,6 @@ static void dwcmshc_enable_card_clk(struct sdhci_host *host)  	}  } -static void dwcmshc_disable_card_clk(struct sdhci_host *host) -{ -	u16 ctrl; - -	ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); -	if (ctrl & SDHCI_CLOCK_CARD_EN) { -		ctrl &= ~SDHCI_CLOCK_CARD_EN; -		sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); -	} -} -  static int dwcmshc_runtime_suspend(struct device *dev)  {  	struct sdhci_host *host = dev_get_drvdata(dev); diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index e78faef67d7a..94076b095571 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1439,6 +1439,9 @@ static int __maybe_unused sdhci_omap_runtime_suspend(struct device *dev)  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);  	struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host); +	if (host->tuning_mode != SDHCI_TUNING_MODE_3) +		mmc_retune_needed(host->mmc); +  	if (omap_host->con != -EINVAL)  		sdhci_runtime_suspend_host(host);  |