Commit 7571438a authored by Linus Torvalds's avatar Linus Torvalds

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

Pull MMC fixes from Ulf Hansson:
 "MMC host:
   - sdhci-iproc: Prevent some spurious interrupts
   - renesas_sdhi/sh_mmcif: Avoid false warnings about IRQs not found

  MEMSTICK host:
   - jmb38x_ms: Fix an error handling path at ->probe()"

* tag 'mmc-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()'
  mmc: sdhci-iproc: fix spurious interrupts on Multiblock reads with bcm2711
  mmc: sh_mmcif: Use platform_get_irq_optional() for optional interrupt
  mmc: renesas_sdhi: Do not use platform_get_irq() to count interrupts
parents 5f93393a 28c9fac0
...@@ -941,7 +941,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev, ...@@ -941,7 +941,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev,
if (!cnt) { if (!cnt) {
rc = -ENODEV; rc = -ENODEV;
pci_dev_busy = 1; pci_dev_busy = 1;
goto err_out; goto err_out_int;
} }
jm = kzalloc(sizeof(struct jmb38x_ms) jm = kzalloc(sizeof(struct jmb38x_ms)
......
...@@ -646,8 +646,8 @@ int renesas_sdhi_probe(struct platform_device *pdev, ...@@ -646,8 +646,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
struct tmio_mmc_dma *dma_priv; struct tmio_mmc_dma *dma_priv;
struct tmio_mmc_host *host; struct tmio_mmc_host *host;
struct renesas_sdhi *priv; struct renesas_sdhi *priv;
int num_irqs, irq, ret, i;
struct resource *res; struct resource *res;
int irq, ret, i;
u16 ver; u16 ver;
of_data = of_device_get_match_data(&pdev->dev); of_data = of_device_get_match_data(&pdev->dev);
...@@ -825,24 +825,31 @@ int renesas_sdhi_probe(struct platform_device *pdev, ...@@ -825,24 +825,31 @@ int renesas_sdhi_probe(struct platform_device *pdev,
host->hs400_complete = renesas_sdhi_hs400_complete; host->hs400_complete = renesas_sdhi_hs400_complete;
} }
i = 0; num_irqs = platform_irq_count(pdev);
while (1) { if (num_irqs < 0) {
irq = platform_get_irq(pdev, i); ret = num_irqs;
if (irq < 0)
break;
i++;
ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
dev_name(&pdev->dev), host);
if (ret)
goto eirq; goto eirq;
} }
/* There must be at least one IRQ source */ /* There must be at least one IRQ source */
if (!i) { if (!num_irqs) {
ret = -ENXIO;
goto eirq;
}
for (i = 0; i < num_irqs; i++) {
irq = platform_get_irq(pdev, i);
if (irq < 0) {
ret = irq; ret = irq;
goto eirq; goto eirq;
} }
ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
dev_name(&pdev->dev), host);
if (ret)
goto eirq;
}
dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n", dev_info(&pdev->dev, "%s base at 0x%08lx max clock rate %u MHz\n",
mmc_hostname(host->mmc), (unsigned long) mmc_hostname(host->mmc), (unsigned long)
(platform_get_resource(pdev, IORESOURCE_MEM, 0)->start), (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
......
...@@ -262,6 +262,7 @@ static const struct sdhci_iproc_data bcm2835_data = { ...@@ -262,6 +262,7 @@ static const struct sdhci_iproc_data bcm2835_data = {
}; };
static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = { static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
.ops = &sdhci_iproc_32only_ops, .ops = &sdhci_iproc_32only_ops,
}; };
......
...@@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev) ...@@ -1393,11 +1393,9 @@ static int sh_mmcif_probe(struct platform_device *pdev)
const char *name; const char *name;
irq[0] = platform_get_irq(pdev, 0); irq[0] = platform_get_irq(pdev, 0);
irq[1] = platform_get_irq(pdev, 1); irq[1] = platform_get_irq_optional(pdev, 1);
if (irq[0] < 0) { if (irq[0] < 0)
dev_err(dev, "Get irq error\n");
return -ENXIO; return -ENXIO;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
reg = devm_ioremap_resource(dev, res); reg = devm_ioremap_resource(dev, res);
......
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