[coreboot-gerrit] Change in ...coreboot[master]: soc/intel/common/block/pcr: Don't use device_t

HAOUAS Elyes (Code Review) gerrit at coreboot.org
Sun Dec 2 21:54:48 CET 2018


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 at 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

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30008
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9d7f1bc22d960d93173760c1bfe4db2dd9277967
Gerrit-Change-Number: 30008
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas at noos.fr>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181202/a98c072e/attachment.html>


More information about the coreboot-gerrit mailing list