Angel Pons | ae59387 | 2020-04-04 18:50:57 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Marc Jones | 2448484 | 2017-05-04 21:17:45 -0600 | [diff] [blame] | 2 | |
Felix Held | dea4e0f | 2021-09-22 20:05:53 +0200 | [diff] [blame] | 3 | #include <amdblocks/gpio.h> |
Marc Jones | 2448484 | 2017-05-04 21:17:45 -0600 | [diff] [blame] | 4 | #include <soc/gpio.h> |
Felix Held | 51d6f5c | 2021-03-24 01:24:39 +0100 | [diff] [blame] | 5 | #include <types.h> |
Richard Spiegel | 2db06bb | 2018-04-20 16:50:12 -0700 | [diff] [blame] | 6 | |
| 7 | static const struct soc_amd_event gpio_event_table[] = { |
| 8 | { GPIO_1, GEVENT_19 }, |
| 9 | { GPIO_2, GEVENT_8 }, |
| 10 | { GPIO_3, GEVENT_2 }, |
| 11 | { GPIO_4, GEVENT_4 }, |
| 12 | { GPIO_5, GEVENT_7 }, |
| 13 | { GPIO_6, GEVENT_10 }, |
| 14 | { GPIO_7, GEVENT_11 }, |
| 15 | { GPIO_8, GEVENT_23 }, |
| 16 | { GPIO_9, GEVENT_22 }, |
| 17 | { GPIO_11, GEVENT_18 }, |
| 18 | { GPIO_13, GEVENT_21 }, |
| 19 | { GPIO_14, GEVENT_6 }, |
| 20 | { GPIO_15, GEVENT_20 }, |
| 21 | { GPIO_16, GEVENT_12 }, |
| 22 | { GPIO_17, GEVENT_13 }, |
| 23 | { GPIO_18, GEVENT_14 }, |
| 24 | { GPIO_21, GEVENT_5 }, |
| 25 | { GPIO_22, GEVENT_3 }, |
| 26 | { GPIO_23, GEVENT_16 }, |
| 27 | { GPIO_24, GEVENT_15 }, |
| 28 | { GPIO_65, GEVENT_0 }, |
| 29 | { GPIO_66, GEVENT_1 }, |
| 30 | { GPIO_68, GEVENT_9 }, |
| 31 | { GPIO_69, GEVENT_17 }, |
| 32 | }; |
| 33 | |
Marshall Dawson | 251d305 | 2019-05-02 17:27:57 -0600 | [diff] [blame] | 34 | void soc_get_gpio_event_table(const struct soc_amd_event **table, size_t *items) |
Richard Spiegel | 2db06bb | 2018-04-20 16:50:12 -0700 | [diff] [blame] | 35 | { |
Marshall Dawson | 251d305 | 2019-05-02 17:27:57 -0600 | [diff] [blame] | 36 | *table = gpio_event_table; |
| 37 | *items = ARRAY_SIZE(gpio_event_table); |
Richard Spiegel | 2db06bb | 2018-04-20 16:50:12 -0700 | [diff] [blame] | 38 | } |