device: Use pcidev_path_on_root()

Change-Id: I2e28b9f4ecaf258bff8a062b5a54cb3d8e2bb9b0
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30400
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Kyösti Mälkki
2018-06-21 16:20:55 +03:00
committed by Felix Held
parent c70eed1e62
commit e7377556cc
30 changed files with 40 additions and 42 deletions

View File

@@ -52,7 +52,7 @@ AGESA_STATUS agesa_fch_initenv(uint32_t Func, uintptr_t FchData,
void *ConfigPtr)
{
AMD_CONFIG_PARAMS *StdHeader = ConfigPtr;
const struct device *dev = dev_find_slot(0, SATA_DEVFN);
const struct device *dev = pcidev_path_on_root(SATA_DEVFN);
if (StdHeader->Func == AMD_INIT_ENV) {
FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData;
@@ -104,7 +104,7 @@ AGESA_STATUS agesa_ReadSpd(uint32_t Func, uintptr_t Data, void *ConfigPtr)
if (!ENV_ROMSTAGE)
return AGESA_UNSUPPORTED;
dev = dev_find_slot(0, DCT_DEVFN);
dev = pcidev_path_on_root(DCT_DEVFN);
if (dev == NULL)
return AGESA_ERROR;