Skip to content

Commit 976171c

Browse files
andy-shevstorulf
authored andcommitted
mmc: sdhci-pci: Remove dead code (rst_n_gpio et al)
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>
1 parent 67f7296 commit 976171c

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

drivers/mmc/host/sdhci-pci-core.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,21 +1915,6 @@ int sdhci_pci_enable_dma(struct sdhci_host *host)
19151915
return 0;
19161916
}
19171917

1918-
static void sdhci_pci_gpio_hw_reset(struct sdhci_host *host)
1919-
{
1920-
struct sdhci_pci_slot *slot = sdhci_priv(host);
1921-
int rst_n_gpio = slot->rst_n_gpio;
1922-
1923-
if (!gpio_is_valid(rst_n_gpio))
1924-
return;
1925-
gpio_set_value_cansleep(rst_n_gpio, 0);
1926-
/* For eMMC, minimum is 1us but give it 10us for good measure */
1927-
udelay(10);
1928-
gpio_set_value_cansleep(rst_n_gpio, 1);
1929-
/* For eMMC, minimum is 200us but give it 300us for good measure */
1930-
usleep_range(300, 1000);
1931-
}
1932-
19331918
static void sdhci_pci_hw_reset(struct sdhci_host *host)
19341919
{
19351920
struct sdhci_pci_slot *slot = sdhci_priv(host);
@@ -2060,7 +2045,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
20602045

20612046
slot->chip = chip;
20622047
slot->host = host;
2063-
slot->rst_n_gpio = -EINVAL;
20642048
slot->cd_idx = -1;
20652049

20662050
host->hw_name = "PCI";
@@ -2086,17 +2070,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
20862070
goto cleanup;
20872071
}
20882072

2089-
if (gpio_is_valid(slot->rst_n_gpio)) {
2090-
if (!devm_gpio_request(&pdev->dev, slot->rst_n_gpio, "eMMC_reset")) {
2091-
gpio_direction_output(slot->rst_n_gpio, 1);
2092-
slot->host->mmc->caps |= MMC_CAP_HW_RESET;
2093-
slot->hw_reset = sdhci_pci_gpio_hw_reset;
2094-
} else {
2095-
dev_warn(&pdev->dev, "failed to request rst_n_gpio\n");
2096-
slot->rst_n_gpio = -EINVAL;
2097-
}
2098-
}
2099-
21002073
host->mmc->pm_caps = MMC_PM_KEEP_POWER;
21012074
host->mmc->slotno = slotno;
21022075
host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;

drivers/mmc/host/sdhci-pci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ struct sdhci_pci_slot {
157157
struct sdhci_pci_chip *chip;
158158
struct sdhci_host *host;
159159

160-
int rst_n_gpio;
161-
162160
int cd_idx;
163161
bool cd_override_level;
164162

0 commit comments

Comments
 (0)