From 1b07797a7b79ea6c11421b61b9cf14b92cb91c66 Mon Sep 17 00:00:00 2001 From: Shelley Chen Date: Tue, 18 Oct 2022 16:32:20 -0700 Subject: soc/qualcomm/sc7280: Remove NVMe init We are required to boot with eMMC enabled in the BIOS to store modem calibration data. Thus, it doesn't make sense to enable NVMe at boot time since we will never boot from NVMe w/o eMMC. We may as well take the boot time reduction (~100ms) by eliminating NVMe initialization. BUG=b:185426670, b:254281839 BRANCH=None TEST=Boot after disabling NVMe and make sure that it still boots Note that we are able to see a little over 100ms in boot time savings with this change. Before: 40:device configuration 824,021 (102,701) After: 40:device configuration 717,402 (44) Cq-Depend: chromium:3964185 Change-Id: I94f614ba0369c073617949285c0781aef5c6263f Signed-off-by: Shelley Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/68562 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/qualcomm/sc7280/Kconfig | 2 -- src/soc/qualcomm/sc7280/soc.c | 10 +++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/soc/qualcomm/sc7280/Kconfig b/src/soc/qualcomm/sc7280/Kconfig index ccba8ff9b5..3f3ded3c59 100644 --- a/src/soc/qualcomm/sc7280/Kconfig +++ b/src/soc/qualcomm/sc7280/Kconfig @@ -19,8 +19,6 @@ config SOC_QUALCOMM_SC7280 select HAVE_LINEAR_FRAMEBUFFER select COMPRESS_BOOTBLOCK select HAVE_UART_SPECIAL - select PCI - select NO_ECAM_MMCONF_SUPPORT if SOC_QUALCOMM_SC7280 diff --git a/src/soc/qualcomm/sc7280/soc.c b/src/soc/qualcomm/sc7280/soc.c index a6851dfcd7..02194a23a7 100644 --- a/src/soc/qualcomm/sc7280/soc.c +++ b/src/soc/qualcomm/sc7280/soc.c @@ -45,10 +45,14 @@ static struct device_operations soc_ops = { static void enable_soc_dev(struct device *dev) { /* Set the operations if it is a special bus type */ - if (dev->path.type == DEVICE_PATH_DOMAIN) - dev->ops = &pci_domain_ops; - else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) + if (dev->path.type == DEVICE_PATH_DOMAIN) { + if (CONFIG(PCI) && CONFIG(NO_ECAM_MMCONF_SUPPORT)) + dev->ops = &pci_domain_ops; + else + printk(BIOS_INFO, "Skip setting PCIe ops\n"); + } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) { dev->ops = &soc_ops; + } } struct chip_operations soc_qualcomm_sc7280_ops = { -- cgit v1.2.3