]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mmc: sdhci-pci: Remove dead code (rst_n_gpio et al)
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 14 Oct 2021 13:26:13 +0000 (16:26 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 19 Oct 2021 10:43:21 +0000 (12:43 +0200)
There is no user of this member. Remove the dead code for good.

The removal is dependent on the previous removal of the
struct sdhci_pci_data.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20211014132613.27861-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-core.c
drivers/mmc/host/sdhci-pci.h

index e2b6f60e9f01b93bdff9948ec1b6462f544d2889..6f9877546830bb5a72cd06998b96a9d316fcee67 100644 (file)
@@ -1915,21 +1915,6 @@ int sdhci_pci_enable_dma(struct sdhci_host *host)
        return 0;
 }
 
-static void sdhci_pci_gpio_hw_reset(struct sdhci_host *host)
-{
-       struct sdhci_pci_slot *slot = sdhci_priv(host);
-       int rst_n_gpio = slot->rst_n_gpio;
-
-       if (!gpio_is_valid(rst_n_gpio))
-               return;
-       gpio_set_value_cansleep(rst_n_gpio, 0);
-       /* For eMMC, minimum is 1us but give it 10us for good measure */
-       udelay(10);
-       gpio_set_value_cansleep(rst_n_gpio, 1);
-       /* For eMMC, minimum is 200us but give it 300us for good measure */
-       usleep_range(300, 1000);
-}
-
 static void sdhci_pci_hw_reset(struct sdhci_host *host)
 {
        struct sdhci_pci_slot *slot = sdhci_priv(host);
@@ -2060,7 +2045,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
 
        slot->chip = chip;
        slot->host = host;
-       slot->rst_n_gpio = -EINVAL;
        slot->cd_idx = -1;
 
        host->hw_name = "PCI";
@@ -2086,17 +2070,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
                        goto cleanup;
        }
 
-       if (gpio_is_valid(slot->rst_n_gpio)) {
-               if (!devm_gpio_request(&pdev->dev, slot->rst_n_gpio, "eMMC_reset")) {
-                       gpio_direction_output(slot->rst_n_gpio, 1);
-                       slot->host->mmc->caps |= MMC_CAP_HW_RESET;
-                       slot->hw_reset = sdhci_pci_gpio_hw_reset;
-               } else {
-                       dev_warn(&pdev->dev, "failed to request rst_n_gpio\n");
-                       slot->rst_n_gpio = -EINVAL;
-               }
-       }
-
        host->mmc->pm_caps = MMC_PM_KEEP_POWER;
        host->mmc->slotno = slotno;
        host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
index 8bb3b9c78589a8749fd0d41c25d7eb2f86446ce0..5e3193278ff99dc560f2be6c76b9e958b19c371d 100644 (file)
@@ -157,8 +157,6 @@ struct sdhci_pci_slot {
        struct sdhci_pci_chip   *chip;
        struct sdhci_host       *host;
 
-       int                     rst_n_gpio;
-
        int                     cd_idx;
        bool                    cd_override_level;