diff --git a/src/commonlib/storage/pci_sdhci.c b/src/commonlib/storage/pci_sdhci.c index f7922d42ea..51b44deabb 100644 --- a/src/commonlib/storage/pci_sdhci.c +++ b/src/commonlib/storage/pci_sdhci.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -42,6 +43,9 @@ struct sd_mmc_ctrlr *new_pci_sdhci_controller(pci_devfn_t dev) { uintptr_t addr; + if (!CONFIG(PCI)) + return NULL; + addr = pci_s_read_config32(dev, PCI_BASE_ADDRESS_0); if (addr == ((uint32_t)~0)) { sdhc_error("Error: PCI SDHCI not found\n");