When CONFIG_PCI is disabled, but COMMONLIB_STORAGE and COMMONLIB_STORAGE_SD are enabled, the compilation of pci_sdhci.c fails. This is because the code attempts to use pci_s_read_config32() with the PCI_BASE_ADDRESS_0 macro, which are only defined when CONFIG_PCI is enabled. Add an early return NULL check based on !CONFIG(PCI) at the beginning of new_pci_sdhci_controller(). This prevents the compiler from attempting to process the PCI-specific code path when PCI support is not configured, resolving the build failure in this specific Kconfig scenario. TEST=Able to build herobrine. Change-Id: I5c70d9b9ebcac13b47bba2c260fdf2ad7d56d4d7 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87092 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com> |
||
|---|---|---|
| .. | ||
| bouncebuf.c | ||
| bouncebuf.h | ||
| Kconfig | ||
| Makefile.mk | ||
| mmc.c | ||
| mmc.h | ||
| pci_sdhci.c | ||
| sd.c | ||
| sd_mmc.c | ||
| sd_mmc.h | ||
| sdhci.c | ||
| sdhci.h | ||
| sdhci_adma.c | ||
| sdhci_display.c | ||
| storage.c | ||
| storage.h | ||
| storage_erase.c | ||
| storage_write.c | ||