diff options
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r-- | src/soc/mediatek/mt8196/Kconfig | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8196/soc.c | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/soc/mediatek/mt8196/Kconfig b/src/soc/mediatek/mt8196/Kconfig index 6d6f883a11..d97b092b91 100644 --- a/src/soc/mediatek/mt8196/Kconfig +++ b/src/soc/mediatek/mt8196/Kconfig @@ -11,6 +11,7 @@ config SOC_MEDIATEK_MT8196 select SOC_MEDIATEK_COMMON select FLASH_DUAL_IO_READ select ARM64_USE_ARCH_TIMER + select PCI if SOC_MEDIATEK_MT8196 diff --git a/src/soc/mediatek/mt8196/soc.c b/src/soc/mediatek/mt8196/soc.c index b62c055426..eb72fca365 100644 --- a/src/soc/mediatek/mt8196/soc.c +++ b/src/soc/mediatek/mt8196/soc.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <device/device.h> +#include <device/pci.h> #include <soc/emi.h> #include <soc/mmu_operations.h> +#include <soc/pcie.h> #include <symbols.h> static void soc_read_resources(struct device *dev) @@ -21,9 +23,23 @@ static struct device_operations soc_ops = { .init = soc_init, }; +static struct device_operations pci_domain_ops = { + .read_resources = &mtk_pcie_domain_read_resources, + .set_resources = &mtk_pcie_domain_set_resources, + .scan_bus = &pci_host_bridge_scan_bus, + .enable = &mtk_pcie_domain_enable, +}; + static void enable_soc_dev(struct device *dev) { - dev->ops = &soc_ops; + if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) { + dev->ops = &soc_ops; + } else if (dev->path.type == DEVICE_PATH_DOMAIN) { + if (mainboard_needs_pcie_init()) + dev->ops = &pci_domain_ops; + else + printk(BIOS_DEBUG, "Skip setting PCIe ops\n"); + } } struct chip_operations soc_mediatek_mt8196_ops = { |