Skip to content

Commit a0753ef

Browse files
lsun100storulf
authored andcommitted
mmc: sdhci-of-dwcmshc: Re-enable support for the BlueField-3 SoC
The commit 08f3dff (mmc: sdhci-of-dwcmshc: add rockchip platform support") introduces the use of_device_get_match_data() to check for some chips. Unfortunately, it also breaks the BlueField-3 FW, which uses ACPI. To fix the problem, let's add the ACPI match data and the corresponding quirks to re-enable the support for the BlueField-3 SoC. Reviewed-by: David Woods <[email protected]> Signed-off-by: Liming Sun <[email protected]> Acked-by: Adrian Hunter <[email protected]> Fixes: 08f3dff ("mmc: sdhci-of-dwcmshc: add rockchip platform support") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [Ulf: Clarified the commit message a bit] Signed-off-by: Ulf Hansson <[email protected]>
1 parent b3e1cf3 commit a0753ef

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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)