hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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,17 +696,15 @@
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)
712
- return -ENXIO;
706
+ if (irq < 0)
707
+ return irq;
713708
714709 mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
715710 if (!mmc) {
....@@ -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;