Skip to content

Commit 4d099c3

Browse files
committed
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()
2 parents 50cd95a + a0753ef commit 4d099c3

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
11721172
}
11731173

11741174
ret = device_reset_optional(&pdev->dev);
1175-
if (ret)
1176-
return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
1175+
if (ret) {
1176+
dev_err_probe(&pdev->dev, ret, "device reset failed\n");
1177+
goto free_host;
1178+
}
11771179

11781180
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
11791181
host->regs = devm_ioremap_resource(&pdev->dev, res);

drivers/mmc/host/mtk-sd.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,6 +2446,9 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery)
24462446
/* disable busy check */
24472447
sdr_clr_bits(host->base + MSDC_PATCH_BIT1, MSDC_PB1_BUSY_CHECK_SEL);
24482448

2449+
val = readl(host->base + MSDC_INT);
2450+
writel(val, host->base + MSDC_INT);
2451+
24492452
if (recovery) {
24502453
sdr_set_field(host->base + MSDC_DMA_CTRL,
24512454
MSDC_DMA_CTRL_STOP, 1);
@@ -2932,11 +2935,14 @@ static int __maybe_unused msdc_suspend(struct device *dev)
29322935
struct mmc_host *mmc = dev_get_drvdata(dev);
29332936
struct msdc_host *host = mmc_priv(mmc);
29342937
int ret;
2938+
u32 val;
29352939

29362940
if (mmc->caps2 & MMC_CAP2_CQE) {
29372941
ret = cqhci_suspend(mmc);
29382942
if (ret)
29392943
return ret;
2944+
val = readl(host->base + MSDC_INT);
2945+
writel(val, host->base + MSDC_INT);
29402946
}
29412947

29422948
/*

drivers/mmc/host/pxamci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static int pxamci_probe(struct platform_device *pdev)
648648

649649
ret = pxamci_of_init(pdev, mmc);
650650
if (ret)
651-
return ret;
651+
goto out;
652652

653653
host = mmc_priv(mmc);
654654
host->mmc = mmc;
@@ -672,7 +672,7 @@ static int pxamci_probe(struct platform_device *pdev)
672672

673673
ret = pxamci_init_ocr(host);
674674
if (ret < 0)
675-
return ret;
675+
goto out;
676676

677677
mmc->caps = 0;
678678
host->cmdat = 0;

drivers/mmc/host/sdhci-of-dwcmshc.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_pdata = {
349349
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
350350
};
351351

352+
#ifdef CONFIG_ACPI
353+
static const struct sdhci_pltfm_data sdhci_dwcmshc_bf3_pdata = {
354+
.ops = &sdhci_dwcmshc_ops,
355+
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
356+
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
357+
SDHCI_QUIRK2_ACMD23_BROKEN,
358+
};
359+
#endif
360+
352361
static const struct sdhci_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {
353362
.ops = &sdhci_dwcmshc_rk35xx_ops,
354363
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
@@ -431,7 +440,10 @@ MODULE_DEVICE_TABLE(of, sdhci_dwcmshc_dt_ids);
431440

432441
#ifdef CONFIG_ACPI
433442
static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = {
434-
{ .id = "MLNXBF30" },
443+
{
444+
.id = "MLNXBF30",
445+
.driver_data = (kernel_ulong_t)&sdhci_dwcmshc_bf3_pdata,
446+
},
435447
{}
436448
};
437449
#endif
@@ -447,7 +459,7 @@ static int dwcmshc_probe(struct platform_device *pdev)
447459
int err;
448460
u32 extra;
449461

450-
pltfm_data = of_device_get_match_data(&pdev->dev);
462+
pltfm_data = device_get_match_data(&pdev->dev);
451463
if (!pltfm_data) {
452464
dev_err(&pdev->dev, "Error: No device match data found\n");
453465
return -ENODEV;

0 commit comments

Comments
 (0)