tree: Remove unused <assert.h>
[coreboot.git] / src / soc / amd / mendocino / uart.c
blob1d3c82928f5c476a98adc400e91b354778604e5c
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/gpio.h>
4 #include <amdblocks/uart.h>
5 #include <commonlib/helpers.h>
6 #include <device/mmio.h>
7 #include <gpio.h>
8 #include <soc/aoac_defs.h>
9 #include <soc/iomap.h>
10 #include <soc/southbridge.h>
11 #include <soc/uart.h>
12 #include <types.h>
14 static const struct soc_uart_ctrlr_info uart_info[] = {
15 [0] = { APU_UART0_BASE, FCH_AOAC_DEV_UART0, "FUR0", {
16 PAD_NF(GPIO_143, UART0_TXD, PULL_NONE),
17 PAD_NF(GPIO_141, UART0_RXD, PULL_NONE),
18 } },
19 [1] = { APU_UART1_BASE, FCH_AOAC_DEV_UART1, "FUR1", {
20 PAD_NF(GPIO_140, UART1_TXD, PULL_NONE),
21 PAD_NF(GPIO_142, UART1_RXD, PULL_NONE),
22 } },
23 [2] = { APU_UART2_BASE, FCH_AOAC_DEV_UART2, "FUR2", {
24 PAD_NF(GPIO_138, UART2_TXD, PULL_NONE),
25 PAD_NF(GPIO_136, UART2_RXD, PULL_NONE),
26 } },
27 [3] = { APU_UART3_BASE, FCH_AOAC_DEV_UART3, "FUR3", {
28 PAD_NF(GPIO_135, UART3_TXD, PULL_NONE),
29 PAD_NF(GPIO_137, UART3_RXD, PULL_NONE),
30 } },
31 [4] = { APU_UART4_BASE, FCH_AOAC_DEV_UART4, "FUR4", {
32 PAD_NF(GPIO_156, UART4_TXD, PULL_NONE),
33 PAD_NF(GPIO_155, UART4_RXD, PULL_NONE),
34 } },
37 const struct soc_uart_ctrlr_info *soc_get_uart_ctrlr_info(size_t *num_ctrlrs)
39 *num_ctrlrs = ARRAY_SIZE(uart_info);
40 return uart_info;
43 void clear_uart_legacy_config(void)
45 write16p(FCH_LEGACY_UART_DECODE, 0);