Skip to content

Commit 057373c

Browse files
committed
mmc: sdhci-pci: Remove dead code (rst_n_gpio et al)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2144641 commit 976171c Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu, 14 Oct 2021 16:26:13 +0300 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> Signed-off-by: Mark Salter <msalter@redhat.com>
1 parent 9649f64 commit 057373c

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
@@ -1910,21 +1910,6 @@ int sdhci_pci_enable_dma(struct sdhci_host *host)
19101910
return 0;
19111911
}
19121912

1913-
static void sdhci_pci_gpio_hw_reset(struct sdhci_host *host)
1914-
{
1915-
struct sdhci_pci_slot *slot = sdhci_priv(host);
1916-
int rst_n_gpio = slot->rst_n_gpio;
1917-
1918-
if (!gpio_is_valid(rst_n_gpio))
1919-
return;
1920-
gpio_set_value_cansleep(rst_n_gpio, 0);
1921-
/* For eMMC, minimum is 1us but give it 10us for good measure */
1922-
udelay(10);
1923-
gpio_set_value_cansleep(rst_n_gpio, 1);
1924-
/* For eMMC, minimum is 200us but give it 300us for good measure */
1925-
usleep_range(300, 1000);
1926-
}
1927-
19281913
static void sdhci_pci_hw_reset(struct sdhci_host *host)
19291914
{
19301915
struct sdhci_pci_slot *slot = sdhci_priv(host);
@@ -2055,7 +2040,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
20552040

20562041
slot->chip = chip;
20572042
slot->host = host;
2058-
slot->rst_n_gpio = -EINVAL;
20592043
slot->cd_idx = -1;
20602044

20612045
host->hw_name = "PCI";
@@ -2081,17 +2065,6 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
20812065
goto cleanup;
20822066
}
20832067

2084-
if (gpio_is_valid(slot->rst_n_gpio)) {
2085-
if (!devm_gpio_request(&pdev->dev, slot->rst_n_gpio, "eMMC_reset")) {
2086-
gpio_direction_output(slot->rst_n_gpio, 1);
2087-
slot->host->mmc->caps |= MMC_CAP_HW_RESET;
2088-
slot->hw_reset = sdhci_pci_gpio_hw_reset;
2089-
} else {
2090-
dev_warn(&pdev->dev, "failed to request rst_n_gpio\n");
2091-
slot->rst_n_gpio = -EINVAL;
2092-
}
2093-
}
2094-
20952068
host->mmc->pm_caps = MMC_PM_KEEP_POWER;
20962069
host->mmc->slotno = slotno;
20972070
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)