mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 20:38:03 +00:00

Introduces functionality to retrieve console information from the device tree (DTB) and use it in TF-A code. With fdt_get_stdout_node_offset() function, which reads the 'secure-chosen' first,'chosen' and 'stdout-path' properties from the DTB, providing a convenient and standardized way to access serial console information. Implemented a comparison mechanism between early console information and the data populated from the DTB. In case of a mismatch, the commit takes care of unregistering the build-time console configuration and registering the DTB-based console. Reorganizes the console configuration setup in BL31 by moving it to a dedicated function called setup_console() in the plat_console.c file. This change improves code readability by isolating console-related settings, making it easier to manage and extend the console configuration in the future. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Change-Id: I857042fc0fb8f070bbc11f6b47aa57a72fbe5392
27 lines
509 B
C
27 lines
509 B
C
/*
|
|
* Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef PLAT_DT_UART_H
|
|
#define PLAT_DT_UART_H
|
|
|
|
#define DT_UART_DCC_COMPAT "arm,dcc"
|
|
|
|
#if defined(PLAT_zynqmp)
|
|
#define DT_UART_COMPAT "xlnx,zynqmp-uart"
|
|
#else
|
|
#define DT_UART_COMPAT "arm,pl011"
|
|
#endif
|
|
|
|
typedef struct dt_uart_info_s {
|
|
char compatible[30];
|
|
uintptr_t base;
|
|
uint32_t baud_rate;
|
|
int32_t status;
|
|
} dt_uart_info_t;
|
|
|
|
void setup_console(void);
|
|
|
|
#endif /* PLAT_DT_UART_H */
|