diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-07-30 02:58:19 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-07-31 01:28:39 +0000 |
commit | b93a9a282fbfd8fa05630adb5f226ba00583aebe (patch) | |
tree | 0626872627863e918b9b618277c99653e39865f8 | |
parent | 75196bf6bba65c10fb37e528046d693d605f2fe9 (diff) |
soc/amd/common/block/gpio_banks/gpio: add comment in check_gpios
Each bit in the GPIO wake status index registers is set to 1 when at
least one of 4 corresponding GPIO pins has its wake status register set.
Added the comment since the gpio_base + i * 4 in the next line looked as
if it calculates some absolute register value which is not what the code
does or should be doing.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I2fc8e9c5bd7c1b011f364b05d0cfdeb0df88ada6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56703
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/amd/common/block/gpio_banks/gpio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c index 7564aa2159..24925bdc60 100644 --- a/src/soc/amd/common/block/gpio_banks/gpio.c +++ b/src/soc/amd/common/block/gpio_banks/gpio.c @@ -308,6 +308,7 @@ static void check_gpios(uint32_t wake_stat, int bit_limit, int gpio_base, for (i = 0; i < bit_limit; i++) { if (!(wake_stat & BIT(i))) continue; + /* Each wake status register bit is for 4 GPIOs that then will be checked */ begin = gpio_base + i * 4; end = begin + 4; /* There is no gpio 63. */ |