.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2010 Marvell International Ltd. |
---|
3 | 4 | * Zhangfei Gao <zhangfei.gao@marvell.com> |
---|
.. | .. |
---|
5 | 6 | * Mingwei Wang <mwwang@marvell.com> |
---|
6 | 7 | * Philip Rakity <prakity@marvell.com> |
---|
7 | 8 | * Mark Brown <markb@marvell.com> |
---|
8 | | - * |
---|
9 | | - * This software is licensed under the terms of the GNU General Public |
---|
10 | | - * License version 2, as published by the Free Software Foundation, and |
---|
11 | | - * may be copied, distributed, and modified under those terms. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | 9 | */ |
---|
19 | 10 | #include <linux/err.h> |
---|
20 | 11 | #include <linux/init.h> |
---|
21 | 12 | #include <linux/platform_device.h> |
---|
22 | 13 | #include <linux/clk.h> |
---|
23 | 14 | #include <linux/io.h> |
---|
24 | | -#include <linux/gpio.h> |
---|
25 | 15 | #include <linux/mmc/card.h> |
---|
26 | 16 | #include <linux/mmc/host.h> |
---|
27 | | -#include <linux/mmc/slot-gpio.h> |
---|
28 | 17 | #include <linux/platform_data/pxa_sdhci.h> |
---|
29 | 18 | #include <linux/slab.h> |
---|
30 | 19 | #include <linux/delay.h> |
---|
31 | 20 | #include <linux/module.h> |
---|
32 | 21 | #include <linux/of.h> |
---|
33 | 22 | #include <linux/of_device.h> |
---|
34 | | -#include <linux/of_gpio.h> |
---|
35 | 23 | #include <linux/pm.h> |
---|
36 | 24 | #include <linux/pm_runtime.h> |
---|
37 | 25 | #include <linux/mbus.h> |
---|
.. | .. |
---|
452 | 440 | host->mmc->caps2 |= pdata->host_caps2; |
---|
453 | 441 | if (pdata->pm_caps) |
---|
454 | 442 | host->mmc->pm_caps |= pdata->pm_caps; |
---|
455 | | - |
---|
456 | | - if (gpio_is_valid(pdata->ext_cd_gpio)) { |
---|
457 | | - ret = mmc_gpio_request_cd(host->mmc, pdata->ext_cd_gpio, |
---|
458 | | - 0); |
---|
459 | | - if (ret) { |
---|
460 | | - dev_err(mmc_dev(host->mmc), |
---|
461 | | - "failed to allocate card detect gpio\n"); |
---|
462 | | - goto err_cd_req; |
---|
463 | | - } |
---|
464 | | - } |
---|
465 | 443 | } |
---|
466 | 444 | |
---|
467 | 445 | pm_runtime_get_noresume(&pdev->dev); |
---|
.. | .. |
---|
486 | 464 | pm_runtime_disable(&pdev->dev); |
---|
487 | 465 | pm_runtime_put_noidle(&pdev->dev); |
---|
488 | 466 | err_of_parse: |
---|
489 | | -err_cd_req: |
---|
490 | 467 | err_mbus_win: |
---|
491 | 468 | clk_disable_unprepare(pxa->clk_io); |
---|
492 | 469 | clk_disable_unprepare(pxa->clk_core); |
---|
.. | .. |
---|
577 | 554 | if (!IS_ERR(pxa->clk_core)) |
---|
578 | 555 | clk_prepare_enable(pxa->clk_core); |
---|
579 | 556 | |
---|
580 | | - return sdhci_runtime_resume_host(host); |
---|
| 557 | + return sdhci_runtime_resume_host(host, 0); |
---|
581 | 558 | } |
---|
582 | 559 | #endif |
---|
583 | 560 | |
---|
.. | .. |
---|
590 | 567 | static struct platform_driver sdhci_pxav3_driver = { |
---|
591 | 568 | .driver = { |
---|
592 | 569 | .name = "sdhci-pxav3", |
---|
| 570 | + .probe_type = PROBE_PREFER_ASYNCHRONOUS, |
---|
593 | 571 | .of_match_table = of_match_ptr(sdhci_pxav3_of_match), |
---|
594 | 572 | .pm = &sdhci_pxav3_pmops, |
---|
595 | 573 | }, |
---|