hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/mmc/host/meson-mx-sdio.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * meson-mx-sdio.c - Meson6, Meson8 and Meson8b SDIO/MMC Host Controller
34 *
45 * Copyright (C) 2015 Endless Mobile, Inc.
56 * Author: Carlo Caione <carlo@endlessm.com>
67 * Copyright (C) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or (at
11
- * your option) any later version.
128 */
139
1410 #include <linux/bitfield.h>
....@@ -19,6 +15,7 @@
1915 #include <linux/dma-mapping.h>
2016 #include <linux/module.h>
2117 #include <linux/interrupt.h>
18
+#include <linux/io.h>
2219 #include <linux/ioport.h>
2320 #include <linux/platform_device.h>
2421 #include <linux/of_platform.h>
....@@ -297,7 +294,7 @@
297294 switch (ios->power_mode) {
298295 case MMC_POWER_OFF:
299296 vdd = 0;
300
- /* fall-through: */
297
+ fallthrough;
301298 case MMC_POWER_UP:
302299 if (!IS_ERR(mmc->supply.vmmc)) {
303300 host->error = mmc_regulator_set_ocr(mmc,
....@@ -567,7 +564,7 @@
567564 mmc->f_max = clk_round_rate(host->cfg_div_clk,
568565 clk_get_rate(host->parent_clk));
569566
570
- mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
567
+ mmc->caps |= MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
571568 mmc->ops = &meson_mx_mmc_ops;
572569
573570 ret = mmc_of_parse(mmc);
....@@ -635,7 +632,6 @@
635632 struct platform_device *slot_pdev;
636633 struct mmc_host *mmc;
637634 struct meson_mx_mmc_host *host;
638
- struct resource *res;
639635 int ret, irq;
640636 u32 conf;
641637
....@@ -660,8 +656,7 @@
660656
661657 platform_set_drvdata(pdev, host);
662658
663
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
664
- host->base = devm_ioremap_resource(host->controller_dev, res);
659
+ host->base = devm_platform_ioremap_resource(pdev, 0);
665660 if (IS_ERR(host->base)) {
666661 ret = PTR_ERR(host->base);
667662 goto error_free_mmc;
....@@ -765,6 +760,7 @@
765760 .remove = meson_mx_mmc_remove,
766761 .driver = {
767762 .name = "meson-mx-sdio",
763
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
768764 .of_match_table = of_match_ptr(meson_mx_mmc_of_match),
769765 },
770766 };