diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-15 18:00:08 +1300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-27 13:59:37 +1300 |
commit | 326aae258925b689b04dbd782a7e5e76e4eaf864 (patch) | |
tree | 6fc2e9cb602afea5e6cad3b7fd42f8ac81166fdb /drivers/mmc | |
parent | 42ee0cd216e54a567fa8a1459ef9ebbf34272207 (diff) | |
download | u-boot-326aae258925b689b04dbd782a7e5e76e4eaf864.zip u-boot-326aae258925b689b04dbd782a7e5e76e4eaf864.tar.gz u-boot-326aae258925b689b04dbd782a7e5e76e4eaf864.tar.bz2 |
mmc: pci_mmc: Set up the card detect
The driver currently reads the card-detect but does not register it with
the MMC stack. Update this so that card-detect works as expected.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/pci_mmc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c index fd5dd22..b9ab064 100644 --- a/drivers/mmc/pci_mmc.c +++ b/drivers/mmc/pci_mmc.c @@ -53,6 +53,7 @@ static int pci_mmc_probe(struct udevice *dev) host->ioaddr = (void *)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, PCI_REGION_MEM); host->name = dev->name; + host->cd_gpio = priv->cd_gpio; host->mmc = &plat->mmc; host->mmc->dev = dev; ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0); @@ -68,8 +69,11 @@ static int pci_mmc_of_to_plat(struct udevice *dev) { if (CONFIG_IS_ENABLED(DM_GPIO)) { struct pci_mmc_priv *priv = dev_get_priv(dev); + int ret; - gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN); + ret = gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, + GPIOD_IS_IN); + log_debug("cd-gpio %s done, ret=%d\n", dev->name, ret); } return 0; |