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>
This commit is contained in:
parent
21813c3577
commit
298150d9eb
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue