soc/amd/common: Move GEVENT definitions to gpio_defs.h

This change will allow for GEVENTs to be used in ASL code.

BUG=b:180507937
TEST=builds

Signed-off-by: Mathew King <mathewk@chromium.org>
Change-Id: I77abd134555c21a32a302ee92cd080284cd2e634
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51289
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Mathew King 2021-03-05 07:01:51 -07:00 committed by Felix Held
parent 95675d94de
commit 5e8e483051
2 changed files with 33 additions and 35 deletions

View File

@ -32,41 +32,6 @@ void gpio_fill_wake_state(struct gpio_wake_state *state);
/* Add gpio events to the eventlog. */ /* Add gpio events to the eventlog. */
void gpio_add_events(void); void gpio_add_events(void);
enum {
GEVENT_0,
GEVENT_1,
GEVENT_2,
GEVENT_3,
GEVENT_4,
GEVENT_5,
GEVENT_6,
GEVENT_7,
GEVENT_8,
GEVENT_9,
GEVENT_10,
GEVENT_11,
GEVENT_12,
GEVENT_13,
GEVENT_14,
GEVENT_15,
GEVENT_16,
GEVENT_17,
GEVENT_18,
GEVENT_19,
GEVENT_20,
GEVENT_21,
GEVENT_22,
GEVENT_23,
GEVENT_24,
GEVENT_25,
GEVENT_26,
GEVENT_27,
GEVENT_28,
GEVENT_29,
GEVENT_30,
GEVENT_31,
};
static inline bool is_gpio_event_level_triggered(uint32_t flags) static inline bool is_gpio_event_level_triggered(uint32_t flags)
{ {
return (flags & GPIO_FLAG_EVENT_TRIGGER_MASK) == GPIO_FLAG_EVENT_TRIGGER_LEVEL; return (flags & GPIO_FLAG_EVENT_TRIGGER_MASK) == GPIO_FLAG_EVENT_TRIGGER_LEVEL;

View File

@ -245,4 +245,37 @@
#define PAD_NC(pin) \ #define PAD_NC(pin) \
PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, PAD_PULL(PULL_DOWN)) PAD_CFG_STRUCT(pin, pin ## _IOMUX_GPIOxx, PAD_PULL(PULL_DOWN))
#define GEVENT_0 0
#define GEVENT_1 1
#define GEVENT_2 2
#define GEVENT_3 3
#define GEVENT_4 4
#define GEVENT_5 5
#define GEVENT_6 6
#define GEVENT_7 7
#define GEVENT_8 8
#define GEVENT_9 9
#define GEVENT_10 10
#define GEVENT_11 11
#define GEVENT_12 12
#define GEVENT_13 13
#define GEVENT_14 14
#define GEVENT_15 15
#define GEVENT_16 16
#define GEVENT_17 17
#define GEVENT_18 18
#define GEVENT_19 19
#define GEVENT_20 20
#define GEVENT_21 21
#define GEVENT_22 22
#define GEVENT_23 23
#define GEVENT_24 24
#define GEVENT_25 25
#define GEVENT_26 26
#define GEVENT_27 27
#define GEVENT_28 28
#define GEVENT_29 29
#define GEVENT_30 30
#define GEVENT_31 31
#endif /* AMD_BLOCK_GPIO_DEFS_H */ #endif /* AMD_BLOCK_GPIO_DEFS_H */