Skip to content

Commit 31e43f3

Browse files
benchuangglistorulf
authored andcommitted
mmc: sdhci-pci-gli: Enable MSI interrupt for GL975x
Enable MSI interrupt for GL9750/GL9755. Some platforms do not support PCI INTx and devices can not work without interrupt. Like messages below: [ 4.487132] sdhci-pci 0000:01:00.0: SDHCI controller found [17a0:9755] (rev 0) [ 4.487198] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PBR2._PRT.APS2], AE_NOT_FOUND (20190816/psargs-330) [ 4.487397] ACPI Error: Aborting method \_SB.PCI0.PBR2._PRT due to previous error (AE_NOT_FOUND) (20190816/psparse-529) [ 4.487707] pcieport 0000:00:01.3: can't derive routing for PCI INT A [ 4.487709] sdhci-pci 0000:01:00.0: PCI INT A: no GSI Signed-off-by: Ben Chuang <[email protected]> Tested-by: Raul E Rangel <[email protected]> Fixes: e51df6c ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 9051db3 commit 31e43f3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

drivers/mmc/host/sdhci-pci-gli.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,26 @@ static int gl9750_execute_tuning(struct sdhci_host *host, u32 opcode)
262262
return 0;
263263
}
264264

265+
static void gli_pcie_enable_msi(struct sdhci_pci_slot *slot)
266+
{
267+
int ret;
268+
269+
ret = pci_alloc_irq_vectors(slot->chip->pdev, 1, 1,
270+
PCI_IRQ_MSI | PCI_IRQ_MSIX);
271+
if (ret < 0) {
272+
pr_warn("%s: enable PCI MSI failed, error=%d\n",
273+
mmc_hostname(slot->host->mmc), ret);
274+
return;
275+
}
276+
277+
slot->host->irq = pci_irq_vector(slot->chip->pdev, 0);
278+
}
279+
265280
static int gli_probe_slot_gl9750(struct sdhci_pci_slot *slot)
266281
{
267282
struct sdhci_host *host = slot->host;
268283

284+
gli_pcie_enable_msi(slot);
269285
slot->host->mmc->caps2 |= MMC_CAP2_NO_SDIO;
270286
sdhci_enable_v4_mode(host);
271287

@@ -276,6 +292,7 @@ static int gli_probe_slot_gl9755(struct sdhci_pci_slot *slot)
276292
{
277293
struct sdhci_host *host = slot->host;
278294

295+
gli_pcie_enable_msi(slot);
279296
slot->host->mmc->caps2 |= MMC_CAP2_NO_SDIO;
280297
sdhci_enable_v4_mode(host);
281298

0 commit comments

Comments
 (0)