.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Marvell MMC/SD/SDIO driver |
---|
3 | 4 | * |
---|
4 | 5 | * Authors: Maen Suleiman, Nicolas Pitre |
---|
5 | 6 | * 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. |
---|
10 | 7 | */ |
---|
11 | 8 | |
---|
12 | 9 | #include <linux/module.h> |
---|
.. | .. |
---|
24 | 21 | #include <linux/mmc/host.h> |
---|
25 | 22 | #include <linux/mmc/slot-gpio.h> |
---|
26 | 23 | |
---|
27 | | -#include <asm/sizes.h> |
---|
| 24 | +#include <linux/sizes.h> |
---|
28 | 25 | #include <asm/unaligned.h> |
---|
29 | 26 | |
---|
30 | 27 | #include "mvsdio.h" |
---|
.. | .. |
---|
699 | 696 | struct mmc_host *mmc = NULL; |
---|
700 | 697 | struct mvsd_host *host = NULL; |
---|
701 | 698 | const struct mbus_dram_target_info *dram; |
---|
702 | | - struct resource *r; |
---|
703 | 699 | int ret, irq; |
---|
704 | 700 | |
---|
705 | 701 | if (!np) { |
---|
706 | 702 | dev_err(&pdev->dev, "no DT node\n"); |
---|
707 | 703 | return -ENODEV; |
---|
708 | 704 | } |
---|
709 | | - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
710 | 705 | irq = platform_get_irq(pdev, 0); |
---|
711 | | - if (!r || irq < 0) |
---|
712 | | - return -ENXIO; |
---|
| 706 | + if (irq < 0) |
---|
| 707 | + return irq; |
---|
713 | 708 | |
---|
714 | 709 | mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev); |
---|
715 | 710 | if (!mmc) { |
---|
.. | .. |
---|
757 | 752 | if (maxfreq) |
---|
758 | 753 | mmc->f_max = maxfreq; |
---|
759 | 754 | |
---|
760 | | - mmc->caps |= MMC_CAP_ERASE; |
---|
761 | | - |
---|
762 | 755 | spin_lock_init(&host->lock); |
---|
763 | 756 | |
---|
764 | | - host->base = devm_ioremap_resource(&pdev->dev, r); |
---|
| 757 | + host->base = devm_platform_ioremap_resource(pdev, 0); |
---|
765 | 758 | if (IS_ERR(host->base)) { |
---|
766 | 759 | ret = PTR_ERR(host->base); |
---|
767 | 760 | goto out; |
---|
.. | .. |
---|
831 | 824 | .remove = mvsd_remove, |
---|
832 | 825 | .driver = { |
---|
833 | 826 | .name = DRIVER_NAME, |
---|
| 827 | + .probe_type = PROBE_PREFER_ASYNCHRONOUS, |
---|
834 | 828 | .of_match_table = mvsdio_dt_ids, |
---|
835 | 829 | }, |
---|
836 | 830 | }; |
---|