[coreboot-gerrit] New patch to review for coreboot: intel/apollolake: Fix typo in gpi_status_get

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Fri Aug 19 17:52:15 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16264

-gerrit

commit 147321851a5496807ddb1fdaeda85b503069fb44
Author: Furquan Shaikh <furquan at google.com>
Date:   Thu Aug 18 21:29:27 2016 -0700

    intel/apollolake: Fix typo in gpi_status_get
    
    sts_index is calculated incorrectly because of wrong use of
    parenthesis. This lead to wrong bit being checked for EC_SMI_GPI on reef
    and lidclose event was missed.
    
    BUG=chrome-os-partner:56395
    BRANCH=None
    TEST=Verified that lidclose event is seen and handled by SMM in
    coreboot on reef.
    
    Change-Id: Ie0869f89b10b14bec41ce84170ad964a0a8820f6
    Change-I: I56be4aaf30e2d6712fc597b941206ca59ffaa915
    Signed-off-by: Furquan Shaikh <furquan at google.com>
---
 src/soc/intel/apollolake/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/soc/intel/apollolake/gpio.c b/src/soc/intel/apollolake/gpio.c
index 8e4ff3e..a2ac091 100644
--- a/src/soc/intel/apollolake/gpio.c
+++ b/src/soc/intel/apollolake/gpio.c
@@ -328,7 +328,7 @@ int gpi_status_get(const struct gpi_status *sts, gpio_t gpi)
 	if (comm == NULL)
 		return 0;
 
-	sts_index = comm->gpi_offset + (gpi - (comm->first_pad) /
+	sts_index = comm->gpi_offset + ((gpi - comm->first_pad) /
 					GPIO_MAX_NUM_PER_GROUP);
 
 	return !!(sts->grp[sts_index] & (1 << (gpi % GPIO_MAX_NUM_PER_GROUP)));



More information about the coreboot-gerrit mailing list