1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef SOC_INTEL_COMMON_BLOCK_UART_H
4 #define SOC_INTEL_COMMON_BLOCK_UART_H
6 #include <console/uart.h>
7 #include <device/device.h>
11 * While using this common UART block for any SOC following is expected from soc
12 * 1. SOC will define proper UART_BASE which is base address for UART console.
13 * 2. SOC will return correct device pointer based on console index
14 * 3. SOC will allow common code to set UART into legacy mode if supported.
18 * Check if UART debug controller is initialized
20 * true = If debug controller PCI config space is initialized and device is
24 bool uart_is_controller_initialized(void);
27 * Check if dev corresponds to UART debug port controller.
30 * true: UART dev is debug port
33 bool uart_is_debug_controller(struct device
*dev
);
36 * BootBlock pre initialization of UART console
38 void uart_bootblock_init(void);
41 * Get UART debug controller device structure
44 * Pointer to device structure = If device has a UART debug controller.
47 const struct device
*uart_get_device(void);
49 #endif /* SOC_INTEL_COMMON_BLOCK_UART_H */