soc/intel: Replace uses of dev_find_slot()
To call dev_find_slot(0, xx) in romstage can produce invalid results since PCI bus enumeration has not been progressed yet. Replace this with method that relies on bus topology that walks the root bus only. Change-Id: I2883610059bb9fa860bba01179e7d5c58cae00e5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33996 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
committed by
Nico Huber
parent
9c0e14e7c4
commit
903b40a8a4
@ -218,7 +218,7 @@ static uintptr_t calculate_dram_base(size_t *reserved_mem_size)
|
||||
uintptr_t dram_base;
|
||||
const struct device *dev;
|
||||
|
||||
dev = dev_find_slot(0, PCI_DEVFN(SA_DEV_SLOT_IGD, 0));
|
||||
dev = pcidev_on_root(SA_DEV_SLOT_IGD, 0);
|
||||
if (!dev)
|
||||
die_with_post_code(POST_HW_INIT_FAILURE,
|
||||
"ERROR - IGD device not found!");
|
||||
|
Reference in New Issue
Block a user