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>
This commit is contained in:
Kyösti Mälkki
2019-07-12 13:10:19 +03:00
committed by Martin Roth
parent 6046eb405a
commit 71756c21af
19 changed files with 74 additions and 79 deletions

View File

@@ -29,7 +29,7 @@
bool soc_is_vtd_capable(void)
{
struct device *const root_dev = SA_DEV_ROOT;
struct device *const root_dev = pcidev_path_on_root(SA_DEVFN_ROOT);
return root_dev &&
!(pci_read_config32(root_dev, CAPID0_A) & VTD_DISABLE);
}
@@ -42,7 +42,8 @@ bool soc_is_vtd_capable(void)
*/
void soc_add_fixed_mmio_resources(struct device *dev, int *index)
{
struct device *const igd_dev = SA_DEV_IGD;
struct device *const igd_dev = pcidev_path_on_root(SA_DEVFN_IGD);
static const struct sa_mmio_descriptor soc_fixed_resources[] = {
{ PCIEXBAR, CONFIG_MMCONF_BASE_ADDRESS, CONFIG_SA_PCIEX_LENGTH,
"PCIEXBAR" },