HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30008
Change subject: soc/intel/common/block/pcr: Don't use device_t ......................................................................
soc/intel/common/block/pcr: Don't use device_t
Use of device_t is deprecated.
Change-Id: I9d7f1bc22d960d93173760c1bfe4db2dd9277967 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/soc/intel/common/block/pcr/pcr.c 1 file changed, 18 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/30008/1
diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c index 58eb13a..57b2c2b 100644 --- a/src/soc/intel/common/block/pcr/pcr.c +++ b/src/soc/intel/common/block/pcr/pcr.c @@ -220,20 +220,35 @@ }
#if !IS_ENABLED(CONFIG_PCR_COMMON_IOSF_1_0) - -static int pcr_wait_for_completion(device_t dev) +#ifdef __SIMPLE_DEVICE__ +static int pcr_wait_for_completion(pci_devfn_t dev) { struct stopwatch sw;
stopwatch_init_msecs_expire(&sw, PCR_SBI_CMD_TIMEOUT); do { if ((pci_read_config16(dev, P2SB_CR_SBI_STATUS) & - P2SB_CR_SBI_STATUS_BUSY) == 0) + P2SB_CR_SBI_STATUS_BUSY) == 0) return 0; } while (!stopwatch_expired(&sw));
return -1; } +#else +static int pcr_wait_for_completion(struct device *dev) +{ + struct stopwatch sw; + + stopwatch_init_msecs_expire(&sw, PCR_SBI_CMD_TIMEOUT); + do { + if ((pci_read_config16(dev, P2SB_CR_SBI_STATUS) & + P2SB_CR_SBI_STATUS_BUSY) == 0) + return 0; + } while (!stopwatch_expired(&sw)); + + return -1; +} +#endif /* __SIMPLE_DEVICE__ */
/* * API to perform sideband communication