Skip to content

Commit 9376500

Browse files
committed
Merge tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: - Fix support for deferred probing for several host drivers - litex_mmc: Use async probe as it's common for all mmc hosts - meson-gx: Fix bug when scheduling while atomic - mmci_stm32: Fix max busy timeout calculation - sdhci-msm: Disable broken 64-bit DMA on MSM8916 * tag 'mmc-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: usdhi60rol0: fix deferred probing mmc: sunxi: fix deferred probing mmc: sh_mmcif: fix deferred probing mmc: sdhci-spear: fix deferred probing mmc: sdhci-acpi: fix deferred probing mmc: owl: fix deferred probing mmc: omap_hsmmc: fix deferred probing mmc: omap: fix deferred probing mmc: mvsdio: fix deferred probing mmc: mtk-sd: fix deferred probing mmc: meson-gx: fix deferred probing mmc: bcm2835: fix deferred probing mmc: litex_mmc: set PROBE_PREFER_ASYNCHRONOUS mmc: meson-gx: remove redundant mmc_request_done() call from irq context mmc: mmci: stm32: fix max busy timeout calculation mmc: sdhci-msm: Disable broken 64-bit DMA on MSM8916
2 parents 65d4898 + 413db49 commit 9376500

File tree

15 files changed

+30
-27
lines changed

15 files changed

+30
-27
lines changed

drivers/mmc/host/bcm2835.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,8 @@ static int bcm2835_probe(struct platform_device *pdev)
14031403
host->max_clk = clk_get_rate(clk);
14041404

14051405
host->irq = platform_get_irq(pdev, 0);
1406-
if (host->irq <= 0) {
1407-
ret = -EINVAL;
1406+
if (host->irq < 0) {
1407+
ret = host->irq;
14081408
goto err;
14091409
}
14101410

drivers/mmc/host/litex_mmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ static struct platform_driver litex_mmc_driver = {
649649
.driver = {
650650
.name = "litex-mmc",
651651
.of_match_table = litex_match,
652+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
652653
},
653654
};
654655
module_platform_driver(litex_mmc_driver);

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,8 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
991991

992992
if (data && !cmd->error)
993993
data->bytes_xfered = data->blksz * data->blocks;
994-
if (meson_mmc_bounce_buf_read(data) ||
995-
meson_mmc_get_next_command(cmd))
996-
ret = IRQ_WAKE_THREAD;
997-
else
998-
ret = IRQ_HANDLED;
994+
995+
return IRQ_WAKE_THREAD;
999996
}
1000997

1001998
out:
@@ -1007,9 +1004,6 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
10071004
writel(start, host->regs + SD_EMMC_START);
10081005
}
10091006

1010-
if (ret == IRQ_HANDLED)
1011-
meson_mmc_request_done(host->mmc, cmd->mrq);
1012-
10131007
return ret;
10141008
}
10151009

@@ -1192,8 +1186,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
11921186
return PTR_ERR(host->regs);
11931187

11941188
host->irq = platform_get_irq(pdev, 0);
1195-
if (host->irq <= 0)
1196-
return -EINVAL;
1189+
if (host->irq < 0)
1190+
return host->irq;
11971191

11981192
cd_irq = platform_get_irq_optional(pdev, 1);
11991193
mmc_gpio_set_cd_irq(mmc, cd_irq);

drivers/mmc/host/mmci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,8 @@ static void mmci_set_max_busy_timeout(struct mmc_host *mmc)
17351735
return;
17361736

17371737
if (host->variant->busy_timeout && mmc->actual_clock)
1738-
max_busy_timeout = ~0UL / (mmc->actual_clock / MSEC_PER_SEC);
1738+
max_busy_timeout = U32_MAX / DIV_ROUND_UP(mmc->actual_clock,
1739+
MSEC_PER_SEC);
17391740

17401741
mmc->max_busy_timeout = max_busy_timeout;
17411742
}

drivers/mmc/host/mtk-sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
26802680

26812681
host->irq = platform_get_irq(pdev, 0);
26822682
if (host->irq < 0) {
2683-
ret = -EINVAL;
2683+
ret = host->irq;
26842684
goto host_free;
26852685
}
26862686

drivers/mmc/host/mvsdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ static int mvsd_probe(struct platform_device *pdev)
704704
}
705705
irq = platform_get_irq(pdev, 0);
706706
if (irq < 0)
707-
return -ENXIO;
707+
return irq;
708708

709709
mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
710710
if (!mmc) {

drivers/mmc/host/omap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ static int mmc_omap_probe(struct platform_device *pdev)
13431343

13441344
irq = platform_get_irq(pdev, 0);
13451345
if (irq < 0)
1346-
return -ENXIO;
1346+
return irq;
13471347

13481348
host->virt_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
13491349
if (IS_ERR(host->virt_base))

drivers/mmc/host/omap_hsmmc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
17911791
}
17921792

17931793
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1794-
irq = platform_get_irq(pdev, 0);
1795-
if (res == NULL || irq < 0)
1794+
if (!res)
17961795
return -ENXIO;
1796+
irq = platform_get_irq(pdev, 0);
1797+
if (irq < 0)
1798+
return irq;
17971799

17981800
base = devm_ioremap_resource(&pdev->dev, res);
17991801
if (IS_ERR(base))

drivers/mmc/host/owl-mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ static int owl_mmc_probe(struct platform_device *pdev)
637637

638638
owl_host->irq = platform_get_irq(pdev, 0);
639639
if (owl_host->irq < 0) {
640-
ret = -EINVAL;
640+
ret = owl_host->irq;
641641
goto err_release_channel;
642642
}
643643

drivers/mmc/host/sdhci-acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
829829
host->ops = &sdhci_acpi_ops_dflt;
830830
host->irq = platform_get_irq(pdev, 0);
831831
if (host->irq < 0) {
832-
err = -EINVAL;
832+
err = host->irq;
833833
goto err_free;
834834
}
835835

0 commit comments

Comments
 (0)