aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/vr_config.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-07-12 13:10:19 +0300
committerMartin Roth <martinroth@google.com>2019-07-21 18:58:01 +0000
commit71756c21afd14f4114c597487406eb53e23730b2 (patch)
tree7ccb61cf5eb3a5b3fb3024327fce58d141c4e928 /src/soc/intel/skylake/vr_config.c
parent6046eb405a4f1cbb4df1ed0d23276f333bc0998b (diff)
soc/intel: Expand SA_DEV_ROOT for ramstage
We do not want to disguise somewhat complex function calls as simple macros. Change-Id: I298f7f9a1c6a64cfba454e919eeaedc7bb2d4801 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34411 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc/intel/skylake/vr_config.c')
-rw-r--r--src/soc/intel/skylake/vr_config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/soc/intel/skylake/vr_config.c b/src/soc/intel/skylake/vr_config.c
index 905154e8ac..c83e18dd1d 100644
--- a/src/soc/intel/skylake/vr_config.c
+++ b/src/soc/intel/skylake/vr_config.c
@@ -174,17 +174,19 @@ static uint16_t get_dev_id(struct device *dev)
static int get_kbl_sku(void)
{
+ struct device *sa_dev = pcidev_path_on_root(SA_DEVFN_ROOT);
static int sku = -1;
uint16_t id;
if (sku != -1)
return sku;
- id = get_dev_id(SA_DEV_ROOT);
+ id = get_dev_id(sa_dev);
if (id == PCI_DEVICE_ID_INTEL_KBL_U_R)
sku = KBL_R_SKU;
else if (id == PCI_DEVICE_ID_INTEL_KBL_ID_Y) {
- id = get_dev_id(SA_DEV_IGD);
+ struct device *igd_dev = pcidev_path_on_root(SA_DEVFN_IGD);
+ id = get_dev_id(igd_dev);
if (id == PCI_DEVICE_ID_INTEL_AML_GT2_ULX)
sku = AML_Y_SKU;
else