Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56700 )
Change subject: soc/amd/common/block/gpio_banks/gpio: use gpio_t for GPIO numbers ......................................................................
soc/amd/common/block/gpio_banks/gpio: use gpio_t for GPIO numbers
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I7cf9cbd2a287dcfe3a47a8a6b164c2b3d8ae95d6 --- M src/soc/amd/common/block/gpio_banks/gpio.c 1 file changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/56700/1
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c index 108635a..982b240 100644 --- a/src/soc/amd/common/block/gpio_banks/gpio.c +++ b/src/soc/amd/common/block/gpio_banks/gpio.c @@ -282,9 +282,9 @@ } }
-static void check_and_add_wake_gpio(int begin, int end, struct gpio_wake_state *state) +static void check_and_add_wake_gpio(gpio_t begin, gpio_t end, struct gpio_wake_state *state) { - int i; + gpio_t i; uint32_t reg;
for (i = begin; i < end; i++) { @@ -298,12 +298,12 @@ } }
-static void check_gpios(uint32_t wake_stat, int bit_limit, int gpio_base, +static void check_gpios(uint32_t wake_stat, int bit_limit, gpio_t gpio_base, struct gpio_wake_state *state) { int i; - int begin; - int end; + gpio_t begin; + gpio_t end;
for (i = 0; i < bit_limit; i++) { if (!(wake_stat & BIT(i))) @@ -320,9 +320,9 @@ void gpio_fill_wake_state(struct gpio_wake_state *state) { /* Turn the wake registers into "gpio" index to conform to existing API. */ - const uint8_t stat0 = GPIO_WAKE_STAT_0 / sizeof(uint32_t); - const uint8_t stat1 = GPIO_WAKE_STAT_1 / sizeof(uint32_t); - const uint8_t control_switch = GPIO_MASTER_SWITCH / sizeof(uint32_t); + const gpio_t stat0 = GPIO_WAKE_STAT_0 / sizeof(uint32_t); + const gpio_t stat1 = GPIO_WAKE_STAT_1 / sizeof(uint32_t); + const gpio_t control_switch = GPIO_MASTER_SWITCH / sizeof(uint32_t);
memset(state, 0, sizeof(*state));