summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
authorMathew King <mathewk@chromium.org>2021-03-05 07:01:51 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-03-08 21:13:06 +0000
commit5e8e483051a46e77ada42767b5433f012626e933 (patch)
treef0823834b0fabba5f1408fc6ba082f765ce7692f /src/soc/amd/common
parent95675d94de91f268f3e68ef7acdd50b91a882a43 (diff)
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>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/gpio_banks.h35
-rw-r--r--src/soc/amd/common/block/include/amdblocks/gpio_defs.h33
2 files changed, 33 insertions, 35 deletions
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 2d3c769438..7e6914f78d 100644
--- a/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
+++ b/src/soc/amd/common/block/include/amdblocks/gpio_banks.h
@@ -32,41 +32,6 @@ void gpio_fill_wake_state(struct gpio_wake_state *state);
/* Add gpio events to the eventlog. */
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)
{
return (flags & GPIO_FLAG_EVENT_TRIGGER_MASK) == GPIO_FLAG_EVENT_TRIGGER_LEVEL;
diff --git a/src/soc/amd/common/block/include/amdblocks/gpio_defs.h b/src/soc/amd/common/block/include/amdblocks/gpio_defs.h
index f0c6f660d0..2dd10d574f 100644
--- a/src/soc/amd/common/block/include/amdblocks/gpio_defs.h
+++ b/src/soc/amd/common/block/include/amdblocks/gpio_defs.h
@@ -245,4 +245,37 @@
#define PAD_NC(pin) \
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 */