hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/mmc/host/mvsdio.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Marvell MMC/SD/SDIO driver
34 *
45 * Authors: Maen Suleiman, Nicolas Pitre
56 * Copyright (C) 2008-2009 Marvell Ltd.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/module.h>
....@@ -24,7 +21,7 @@
2421 #include <linux/mmc/host.h>
2522 #include <linux/mmc/slot-gpio.h>
2623
27
-#include <asm/sizes.h>
24
+#include <linux/sizes.h>
2825 #include <asm/unaligned.h>
2926
3027 #include "mvsdio.h"
....@@ -699,16 +696,14 @@
699696 struct mmc_host *mmc = NULL;
700697 struct mvsd_host *host = NULL;
701698 const struct mbus_dram_target_info *dram;
702
- struct resource *r;
703699 int ret, irq;
704700
705701 if (!np) {
706702 dev_err(&pdev->dev, "no DT node\n");
707703 return -ENODEV;
708704 }
709
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
710705 irq = platform_get_irq(pdev, 0);
711
- if (!r || irq < 0)
706
+ if (irq < 0)
712707 return -ENXIO;
713708
714709 mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
....@@ -757,11 +752,9 @@
757752 if (maxfreq)
758753 mmc->f_max = maxfreq;
759754
760
- mmc->caps |= MMC_CAP_ERASE;
761
-
762755 spin_lock_init(&host->lock);
763756
764
- host->base = devm_ioremap_resource(&pdev->dev, r);
757
+ host->base = devm_platform_ioremap_resource(pdev, 0);
765758 if (IS_ERR(host->base)) {
766759 ret = PTR_ERR(host->base);
767760 goto out;
....@@ -831,6 +824,7 @@
831824 .remove = mvsd_remove,
832825 .driver = {
833826 .name = DRIVER_NAME,
827
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
834828 .of_match_table = mvsdio_dt_ids,
835829 },
836830 };