Commit 4d099c33 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC host fixes from Ulf Hansson:

 - meson-gx: Fix error handling in ->probe()

 - mtk-sd: Fix a command problem when using cqe off/disable

 - pxamci: Fix error handling in ->probe()

 - sdhci-of-dwcmshc: Fix broken support for the BlueField-3 variant

* tag 'mmc-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC
  mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
  mmc: mtk-sd: Clear interrupts when cqe off/disable
  mmc: pxamci: Fix another error handling path in pxamci_probe()
  mmc: pxamci: Fix an error handling path in pxamci_probe()
parents 50cd95ac a0753ef6
...@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev) ...@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
} }
ret = device_reset_optional(&pdev->dev); ret = device_reset_optional(&pdev->dev);
if (ret) if (ret) {
return dev_err_probe(&pdev->dev, ret, "device reset failed\n"); dev_err_probe(&pdev->dev, ret, "device reset failed\n");
goto free_host;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = devm_ioremap_resource(&pdev->dev, res); host->regs = devm_ioremap_resource(&pdev->dev, res);
......
...@@ -2446,6 +2446,9 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery) ...@@ -2446,6 +2446,9 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery)
/* disable busy check */ /* disable busy check */
sdr_clr_bits(host->base + MSDC_PATCH_BIT1, MSDC_PB1_BUSY_CHECK_SEL); sdr_clr_bits(host->base + MSDC_PATCH_BIT1, MSDC_PB1_BUSY_CHECK_SEL);
val = readl(host->base + MSDC_INT);
writel(val, host->base + MSDC_INT);
if (recovery) { if (recovery) {
sdr_set_field(host->base + MSDC_DMA_CTRL, sdr_set_field(host->base + MSDC_DMA_CTRL,
MSDC_DMA_CTRL_STOP, 1); MSDC_DMA_CTRL_STOP, 1);
...@@ -2932,11 +2935,14 @@ static int __maybe_unused msdc_suspend(struct device *dev) ...@@ -2932,11 +2935,14 @@ static int __maybe_unused msdc_suspend(struct device *dev)
struct mmc_host *mmc = dev_get_drvdata(dev); struct mmc_host *mmc = dev_get_drvdata(dev);
struct msdc_host *host = mmc_priv(mmc); struct msdc_host *host = mmc_priv(mmc);
int ret; int ret;
u32 val;
if (mmc->caps2 & MMC_CAP2_CQE) { if (mmc->caps2 & MMC_CAP2_CQE) {
ret = cqhci_suspend(mmc); ret = cqhci_suspend(mmc);
if (ret) if (ret)
return ret; return ret;
val = readl(host->base + MSDC_INT);
writel(val, host->base + MSDC_INT);
} }
/* /*
......
...@@ -648,7 +648,7 @@ static int pxamci_probe(struct platform_device *pdev) ...@@ -648,7 +648,7 @@ static int pxamci_probe(struct platform_device *pdev)
ret = pxamci_of_init(pdev, mmc); ret = pxamci_of_init(pdev, mmc);
if (ret) if (ret)
return ret; goto out;
host = mmc_priv(mmc); host = mmc_priv(mmc);
host->mmc = mmc; host->mmc = mmc;
...@@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev) ...@@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev)
ret = pxamci_init_ocr(host); ret = pxamci_init_ocr(host);
if (ret < 0) if (ret < 0)
return ret; goto out;
mmc->caps = 0; mmc->caps = 0;
host->cmdat = 0; host->cmdat = 0;
......
...@@ -349,6 +349,15 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = { ...@@ -349,6 +349,15 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = {
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
}; };
#ifdef CONFIG_ACPI
static const struct sdhci_pltfm_data sdhci_dwcmshc_bf3_pdata = {
.ops = &sdhci_dwcmshc_ops,
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
SDHCI_QUIRK2_ACMD23_BROKEN,
};
#endif
static const struct sdhci_pltfm_data sdhci_dwcmshc_rk35xx_pdata = { static const struct sdhci_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {
.ops = &sdhci_dwcmshc_rk35xx_ops, .ops = &sdhci_dwcmshc_rk35xx_ops,
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
...@@ -431,7 +440,10 @@ MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids); ...@@ -431,7 +440,10 @@ MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids);
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = { static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = {
{ .id = "MLNXBF30" }, {
.id = "MLNXBF30",
.driver_data = (kernel_ulong_t)&sdhci_dwcmshc_bf3_pdata,
},
{} {}
}; };
#endif #endif
...@@ -447,7 +459,7 @@ static int dwcmshc_probe(struct platform_device *pdev) ...@@ -447,7 +459,7 @@ static int dwcmshc_probe(struct platform_device *pdev)
int err; int err;
u32 extra; u32 extra;
pltfm_data = of_device_get_match_data(&pdev->dev); pltfm_data = device_get_match_data(&pdev->dev);
if (!pltfm_data) { if (!pltfm_data) {
dev_err(&pdev->dev, "Error: No device match data found\n"); dev_err(&pdev->dev, "Error: No device match data found\n");
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment