soc/amd/common/block/include/gpio_banks: use gpio_t for gpio numbers
With the addition of the remote GPIO support, the GPIO number won't fit
into 8 bit any more, so use the gpio_t type instead which is an uint32_t
typedef.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3de93fd3a2f2af3c1e3b335fef84019c56482051
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56693
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c
index 85f2736..108635a 100644
--- a/src/soc/amd/common/block/gpio_banks/gpio.c
+++ b/src/soc/amd/common/block/gpio_banks/gpio.c
@@ -15,7 +15,7 @@
#include <assert.h>
#include <string.h>
-static int get_gpio_gevent(uint8_t gpio, const struct soc_amd_event *table,
+static int get_gpio_gevent(gpio_t gpio, const struct soc_amd_event *table,
size_t items)
{
int i;
diff --git a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
index 098208b..d17aa7a 100644
--- a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
+++ b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
@@ -6,15 +6,17 @@
#include <types.h>
#include "gpio_defs.h"
+typedef uint32_t gpio_t;
+
struct soc_amd_gpio {
- uint8_t gpio;
+ gpio_t gpio;
uint8_t function;
uint32_t control;
uint32_t flags;
};
struct soc_amd_event {
- uint8_t gpio;
+ gpio_t gpio;
uint8_t event;
};
@@ -24,7 +26,7 @@
/* Number of wake_gpio with a valid setting. */
uint32_t num_valid_wake_gpios;
/* GPIO index number that caused a wake. */
- uint8_t wake_gpios[16];
+ gpio_t wake_gpios[16];
};
/* Fill gpio_wake_state object for future event reporting. */
@@ -52,8 +54,6 @@
return (flags & GPIO_FLAG_EVENT_ACTIVE_MASK) == GPIO_FLAG_EVENT_ACTIVE_LOW;
}
-typedef uint32_t gpio_t;
-
/*
* gpio_configure_pads_with_override accepts as input two GPIO tables:
* 1. Base config