|
28 | 28 | #include <linux/amba/bus.h> |
29 | 29 | #include <linux/clk.h> |
30 | 30 | #include <linux/scatterlist.h> |
31 | | -#include <linux/gpio.h> |
32 | | -#include <linux/of_gpio.h> |
| 31 | +#include <linux/of.h> |
33 | 32 | #include <linux/regulator/consumer.h> |
34 | 33 | #include <linux/dmaengine.h> |
35 | 34 | #include <linux/dma-mapping.h> |
@@ -1675,13 +1674,6 @@ static int mmci_probe(struct amba_device *dev, |
1675 | 1674 | else if (plat->ocr_mask) |
1676 | 1675 | dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n"); |
1677 | 1676 |
|
1678 | | - /* DT takes precedence over platform data. */ |
1679 | | - if (!np) { |
1680 | | - if (!plat->cd_invert) |
1681 | | - mmc->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH; |
1682 | | - mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; |
1683 | | - } |
1684 | | - |
1685 | 1677 | /* We support these capabilities. */ |
1686 | 1678 | mmc->caps |= MMC_CAP_CMD23; |
1687 | 1679 |
|
@@ -1749,30 +1741,16 @@ static int mmci_probe(struct amba_device *dev, |
1749 | 1741 | * - not using DT but using a descriptor table, or |
1750 | 1742 | * - using a table of descriptors ALONGSIDE DT, or |
1751 | 1743 | * look up these descriptors named "cd" and "wp" right here, fail |
1752 | | - * silently of these do not exist and proceed to try platform data |
| 1744 | + * silently of these do not exist |
1753 | 1745 | */ |
1754 | 1746 | if (!np) { |
1755 | 1747 | ret = mmc_gpiod_request_cd(mmc, "cd", 0, false, 0, NULL); |
1756 | | - if (ret < 0) { |
1757 | | - if (ret == -EPROBE_DEFER) |
1758 | | - goto clk_disable; |
1759 | | - else if (gpio_is_valid(plat->gpio_cd)) { |
1760 | | - ret = mmc_gpio_request_cd(mmc, plat->gpio_cd, 0); |
1761 | | - if (ret) |
1762 | | - goto clk_disable; |
1763 | | - } |
1764 | | - } |
| 1748 | + if (ret == -EPROBE_DEFER) |
| 1749 | + goto clk_disable; |
1765 | 1750 |
|
1766 | 1751 | ret = mmc_gpiod_request_ro(mmc, "wp", 0, false, 0, NULL); |
1767 | | - if (ret < 0) { |
1768 | | - if (ret == -EPROBE_DEFER) |
1769 | | - goto clk_disable; |
1770 | | - else if (gpio_is_valid(plat->gpio_wp)) { |
1771 | | - ret = mmc_gpio_request_ro(mmc, plat->gpio_wp); |
1772 | | - if (ret) |
1773 | | - goto clk_disable; |
1774 | | - } |
1775 | | - } |
| 1752 | + if (ret == -EPROBE_DEFER) |
| 1753 | + goto clk_disable; |
1776 | 1754 | } |
1777 | 1755 |
|
1778 | 1756 | ret = devm_request_irq(&dev->dev, dev->irq[0], mmci_irq, IRQF_SHARED, |
|
0 commit comments