diff options
author | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-09-30 13:12:26 -0600 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2020-10-30 15:23:34 +0000 |
commit | e7881ed447c9a6ce5aea99f53c12f5c43fbd81dd (patch) | |
tree | 916be1d28867f07e583b0f8d818e5ef714d20688 /src/soc/intel | |
parent | dd0066a91957cb3ec036a2466a66d86069edc5d2 (diff) |
soc/intel/tigerlake: Replace soc_get_pmc_mux_device with device pointers
Now that device aliases can be used in the devicetree, the hacky function
'soc_get_pmc_mux_device' can be removed and replaced with pointers to the
devices the function was supposed to return (1 for each port).
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie00834c79bd5304998adaccb388ae74a108192b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45747
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/pmc.h | 9 | ||||
-rw-r--r-- | src/soc/intel/tigerlake/pmc.c | 22 |
2 files changed, 0 insertions, 31 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/pmc.h b/src/soc/intel/common/block/include/intelblocks/pmc.h index 75e212740d..329bbe9bd7 100644 --- a/src/soc/intel/common/block/include/intelblocks/pmc.h +++ b/src/soc/intel/common/block/include/intelblocks/pmc.h @@ -51,13 +51,4 @@ int pmc_soc_get_resources(struct pmc_resource_config *cfg); /* API to set ACPI mode */ void pmc_set_acpi_mode(void); -/* - * Returns a reference to the PMC MUX device for the given port number. - * Returns NULL if not found or SoC does not support PMC MUX. - * - * Input: Port number (0-based) - * Output: Const pointer to PMC MUX device - */ -const struct device *soc_get_pmc_mux_device(int port_number); - #endif /* SOC_INTEL_COMMON_BLOCK_PMC_H */ diff --git a/src/soc/intel/tigerlake/pmc.c b/src/soc/intel/tigerlake/pmc.c index f2f8a06260..dbf3671af7 100644 --- a/src/soc/intel/tigerlake/pmc.c +++ b/src/soc/intel/tigerlake/pmc.c @@ -126,28 +126,6 @@ static void soc_pmc_fill_ssdt(const struct device *dev) dev_path(dev)); } -/* FIXME: Rewrite loop below without this. */ -extern struct chip_operations drivers_intel_pmc_mux_ops; - -/* By default, TGL uses the PMC MUX for all ports, so port_number is unused */ -const struct device *soc_get_pmc_mux_device(int port_number) -{ - const struct device *pmc; - struct device *child; - - child = NULL; - pmc = pcidev_path_on_root(PCH_DEVFN_PMC); - if (!pmc || !pmc->link_list) - return NULL; - - while ((child = dev_bus_each_child(pmc->link_list, child)) != NULL) - if (child->chip_ops == &drivers_intel_pmc_mux_ops) - break; - - /* child will either be the correct device or NULL if not found */ - return child; -} - static void soc_acpi_mode_init(struct device *dev) { /* |