aboutsummaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-07-28 17:36:46 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-07-30 23:14:45 +0000
commit298150d9ebed413589a3743a18f1af186f7dcf8f (patch)
tree10331e881745d6a3b371a5a28fca4aa13a776332 /src/soc
parent21813c3577831548a8a1ff9da64334f9c3a96d3a (diff)
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>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/amd/common/block/gpio_banks/gpio.c2
-rw-r--r--src/soc/amd/common/block/include/amdblocks/gpio_banks.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c
index 85f273646b..108635a340 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 098208b123..d17aa7aea7 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 @@ struct gpio_wake_state {
/* 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 @@ static inline bool is_gpio_event_active_low(uint32_t flags)
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