| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef AMD_BLOCK_UART_H |
| 4 | #define AMD_BLOCK_UART_H |
| 5 | |
| 6 | #include <amdblocks/gpio.h> |
| 7 | #include <device/device.h> |
| 8 | #include <types.h> |
| 9 | |
| 10 | struct soc_uart_ctrlr_info { |
| 11 | uintptr_t base; |
| 12 | unsigned int aoac_device; |
| 13 | const char *acpi_name; |
| 14 | struct soc_amd_gpio mux[2]; |
| 15 | }; |
| 16 | |
| 17 | uintptr_t get_uart_base(unsigned int idx); /* get MMIO base address of FCH UART */ |
| 18 | void set_uart_config(unsigned int idx); /* configure hardware of FCH UART selected by idx */ |
| 19 | |
| 20 | /* Getter function to get the SoC UART Controller Information. */ |
| 21 | const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs); |
| 22 | |
| 23 | #endif /* AMD_BLOCK_UART_H */ |