Prasad Kummari | b72494e | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef PLAT_DT_UART_H |
| 8 | #define PLAT_DT_UART_H |
| 9 | |
| 10 | #define DT_UART_DCC_COMPAT "arm,dcc" |
| 11 | |
| 12 | #if defined(PLAT_zynqmp) |
| 13 | #define DT_UART_COMPAT "xlnx,zynqmp-uart" |
| 14 | #else |
| 15 | #define DT_UART_COMPAT "arm,pl011" |
| 16 | #endif |
| 17 | |
Prasad Kummari | 80232f7 | 2024-03-14 15:19:10 +0530 | [diff] [blame^] | 18 | /*Default console type is either CADENCE0 or CADENCE1 or PL011_0 or PL011_1 |
| 19 | * Debug console type is DCC |
| 20 | **/ |
| 21 | #define PLAT_XLNX_CONSOLE_TYPE_DEFAULT 0 |
| 22 | #define PLAT_XLNX_CONSOLE_TYPE_DEBUG 1 |
| 23 | |
Prasad Kummari | b72494e | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 24 | typedef struct dt_uart_info_s { |
| 25 | char compatible[30]; |
| 26 | uintptr_t base; |
| 27 | uint32_t baud_rate; |
| 28 | int32_t status; |
| 29 | } dt_uart_info_t; |
| 30 | |
| 31 | void setup_console(void); |
| 32 | |
Prasad Kummari | 80232f7 | 2024-03-14 15:19:10 +0530 | [diff] [blame^] | 33 | #if defined(CONSOLE_RUNTIME) |
| 34 | void console_runtime_init(void); |
| 35 | #endif |
| 36 | |
Prasad Kummari | b72494e | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 37 | #endif /* PLAT_DT_UART_H */ |