diff options
author | Furquan Shaikh <furquan@google.com> | 2016-08-18 21:29:27 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-08-20 10:48:19 +0200 |
commit | 200f11eb872a55d160b69ab336ff6853f7eee27a (patch) | |
tree | 06475d06a0fde75ca90a72b09c0f05c49dbfabbf /src/soc/intel | |
parent | 986c658c412d7668f58bfe6979836819230df5d7 (diff) |
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: I56be4aaf30e2d6712fc597b941206ca59ffaa915
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/16256
Tested-by: build bot (Jenkins)
Reviewed-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r-- | src/soc/intel/apollolake/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/gpio.c b/src/soc/intel/apollolake/gpio.c index 8e4ff3ebf4..a2ac0915ed 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))); |