soc/mediatek/mt8195: Skip PCIe ops for eMMC SKUs

To avoid unnecessary PCIe early initialization for non-NVMe devices
(which would take about 150ms on dojo), skip setting PCIe ops when
initializing mt8195 SoC.

BUG=b:238850212
TEST=emerge-cherry coreboot
TEST=Dojo SKU1 (eMMC) boot time <= 1s
BRANCH=cherry

Change-Id: I8945890ba422c0c4eb42683935220b7afbb80dfd
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
Yu-Ping Wu 2022-07-19 17:09:39 +08:00 committed by Yu-Ping Wu
parent 7b7250dfae
commit 3b9d6a41b3
1 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootmem.h> #include <bootmem.h>
#include <console/console.h>
#include <device/device.h> #include <device/device.h>
#include <device/pci.h> #include <device/pci.h>
#include <soc/apusys.h> #include <soc/apusys.h>
@ -58,8 +59,12 @@ static void enable_soc_dev(struct device *dev)
{ {
if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) if (dev->path.type == DEVICE_PATH_CPU_CLUSTER)
dev->ops = &soc_ops; dev->ops = &soc_ops;
else if (dev->path.type == DEVICE_PATH_DOMAIN) else if (dev->path.type == DEVICE_PATH_DOMAIN) {
if (mainboard_needs_pcie_init())
dev->ops = &pci_domain_ops; dev->ops = &pci_domain_ops;
else
printk(BIOS_DEBUG, "Skip setting PCIe ops\n");
}
} }
struct chip_operations soc_mediatek_mt8195_ops = { struct chip_operations soc_mediatek_mt8195_ops = {