Yiwei Tang | 51cfe49 | 2023-06-05 16:38:23 +0800 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <soc/ramstage.h> |
| 4 | #include <soc/gpio.h> |
| 5 | |
| 6 | #include "gpio.h" |
| 7 | |
| 8 | static void mainboard_chip_init(void *chip_info) |
| 9 | { |
| 10 | const struct pad_config *pads; |
| 11 | size_t pads_num; |
| 12 | |
| 13 | pads = get_gpio_table(&pads_num); |
| 14 | gpio_configure_pads(pads, pads_num); |
| 15 | } |
| 16 | |
| 17 | void mainboard_override_fsp_gpio(void) |
| 18 | { |
| 19 | const struct pad_config *pads; |
| 20 | size_t pads_num; |
| 21 | |
| 22 | pads = get_override_fsp_gpio_table(&pads_num); |
| 23 | gpio_configure_pads(pads, pads_num); |
| 24 | } |
| 25 | |
| 26 | struct chip_operations mainboard_ops = { |
| 27 | .init = mainboard_chip_init, |
| 28 | }; |