diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-14 06:29:54 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-28 01:03:16 +0300 |
commit | 8a8a8314ce669a5faaad4ddfdbef14551ec452b3 (patch) | |
tree | b672502b232890b5a7155d607937fc27bf186fee /drivers/mmc | |
parent | 60868632f6d89f71aca547df01a075149ad96357 (diff) | |
download | u-boot-8a8a8314ce669a5faaad4ddfdbef14551ec452b3.tar.xz |
mmc: pci_mmc: Set the removable flag
Set this flag so that it is available to those looking at the device. For
non-removable devices there is no need to check for insertion/removable
since the media can never change.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/pci_mmc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c index 9316ac12cc..fd5dd229b5 100644 --- a/drivers/mmc/pci_mmc.c +++ b/drivers/mmc/pci_mmc.c @@ -10,6 +10,7 @@ #include <log.h> #include <malloc.h> #include <mapmem.h> +#include <mmc.h> #include <sdhci.h> #include <acpi/acpigen.h> #include <acpi/acpi_device.h> @@ -40,8 +41,15 @@ static int pci_mmc_probe(struct udevice *dev) struct pci_mmc_plat *plat = dev_get_plat(dev); struct pci_mmc_priv *priv = dev_get_priv(dev); struct sdhci_host *host = &priv->host; + struct blk_desc *desc; int ret; + ret = mmc_of_parse(dev, &plat->cfg); + if (ret) + return ret; + desc = mmc_get_blk_desc(&plat->mmc); + desc->removable = !(plat->cfg.host_caps & MMC_CAP_NONREMOVABLE); + host->ioaddr = (void *)dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, PCI_REGION_MEM); host->name = dev->name; |