[coreboot-gerrit] Change in coreboot[master]: soc/intel/common: Don't clear GPE status register

Subrata Banik (Code Review) gerrit at coreboot.org
Fri Aug 24 17:29:31 CEST 2018


Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/28337


Change subject: soc/intel/common: Don't clear GPE status register
......................................................................

soc/intel/common: Don't clear GPE status register

As per EDS definition for GPE Status register is RW/1C/V, hence
writting mask bit into GPE status will force clear GPE status bit.

This will lead into device side "IRQ timeout" problem as soc code
might relying on GPE status read to know the interrupt status.

TEST=Don't see IRQ timeout issue for TPM.

Change-Id: I27fabb3612251fd8d04f58c05ff9fb2a42ad64b3
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/common/block/pmc/pmclib.c
1 file changed, 3 insertions(+), 5 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/28337/1

diff --git a/src/soc/intel/common/block/pmc/pmclib.c b/src/soc/intel/common/block/pmc/pmclib.c
index 339e674..7f106f4 100644
--- a/src/soc/intel/common/block/pmc/pmclib.c
+++ b/src/soc/intel/common/block/pmc/pmclib.c
@@ -460,7 +460,7 @@
 	return acpi_sleep_from_pm1(pmc_read_pm1_control()) == ACPI_S3;
 }
 
-/* Read and clear GPE status (defined in arch/acpi.h) */
+/* Read GPE status (defined in arch/acpi.h) */
 int acpi_get_gpe(int gpe)
 {
 	int bank;
@@ -474,17 +474,15 @@
 	bank = gpe / 32;
 	mask = 1 << (gpe % 32);
 
-	/* Wait up to 1ms for GPE status to clear */
+	/* Wait up to 1ms for GPE status to trigger */
 	stopwatch_init_msecs_expire(&sw, 1);
 	do {
 		if (stopwatch_expired(&sw))
 			return rc;
 
 		sts = inl(ACPI_BASE_ADDRESS + GPE0_STS(bank));
-		if (sts & mask) {
-			outl(mask, ACPI_BASE_ADDRESS + GPE0_STS(bank));
+		if (sts & mask)
 			rc = 1;
-		}
 	} while (sts & mask);
 
 	return rc;

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27fabb3612251fd8d04f58c05ff9fb2a42ad64b3
Gerrit-Change-Number: 28337
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180824/a1a1d0b9/attachment.html>


More information about the coreboot-gerrit mailing list