.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * meson-mx-sdio.c - Meson6, Meson8 and Meson8b SDIO/MMC Host Controller |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Endless Mobile, Inc. |
---|
5 | 6 | * Author: Carlo Caione <carlo@endlessm.com> |
---|
6 | 7 | * 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. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/bitfield.h> |
---|
.. | .. |
---|
19 | 15 | #include <linux/dma-mapping.h> |
---|
20 | 16 | #include <linux/module.h> |
---|
21 | 17 | #include <linux/interrupt.h> |
---|
| 18 | +#include <linux/io.h> |
---|
22 | 19 | #include <linux/ioport.h> |
---|
23 | 20 | #include <linux/platform_device.h> |
---|
24 | 21 | #include <linux/of_platform.h> |
---|
.. | .. |
---|
297 | 294 | switch (ios->power_mode) { |
---|
298 | 295 | case MMC_POWER_OFF: |
---|
299 | 296 | vdd = 0; |
---|
300 | | - /* fall-through: */ |
---|
| 297 | + fallthrough; |
---|
301 | 298 | case MMC_POWER_UP: |
---|
302 | 299 | if (!IS_ERR(mmc->supply.vmmc)) { |
---|
303 | 300 | host->error = mmc_regulator_set_ocr(mmc, |
---|
.. | .. |
---|
567 | 564 | mmc->f_max = clk_round_rate(host->cfg_div_clk, |
---|
568 | 565 | clk_get_rate(host->parent_clk)); |
---|
569 | 566 | |
---|
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; |
---|
571 | 568 | mmc->ops = &meson_mx_mmc_ops; |
---|
572 | 569 | |
---|
573 | 570 | ret = mmc_of_parse(mmc); |
---|
.. | .. |
---|
635 | 632 | struct platform_device *slot_pdev; |
---|
636 | 633 | struct mmc_host *mmc; |
---|
637 | 634 | struct meson_mx_mmc_host *host; |
---|
638 | | - struct resource *res; |
---|
639 | 635 | int ret, irq; |
---|
640 | 636 | u32 conf; |
---|
641 | 637 | |
---|
.. | .. |
---|
660 | 656 | |
---|
661 | 657 | platform_set_drvdata(pdev, host); |
---|
662 | 658 | |
---|
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); |
---|
665 | 660 | if (IS_ERR(host->base)) { |
---|
666 | 661 | ret = PTR_ERR(host->base); |
---|
667 | 662 | goto error_free_mmc; |
---|
.. | .. |
---|
765 | 760 | .remove = meson_mx_mmc_remove, |
---|
766 | 761 | .driver = { |
---|
767 | 762 | .name = "meson-mx-sdio", |
---|
| 763 | + .probe_type = PROBE_PREFER_ASYNCHRONOUS, |
---|
768 | 764 | .of_match_table = of_match_ptr(meson_mx_mmc_of_match), |
---|
769 | 765 | }, |
---|
770 | 766 | }; |
---|