Prasad Kummari | 3923462 | 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 | #include <assert.h> |
| 8 | #include <errno.h> |
| 9 | #include <stdlib.h> |
| 10 | #include <string.h> |
| 11 | |
| 12 | #include <common/debug.h> |
| 13 | #include <common/fdt_fixup.h> |
| 14 | #include <common/fdt_wrappers.h> |
| 15 | #include <drivers/arm/dcc.h> |
| 16 | #include <drivers/arm/pl011.h> |
| 17 | #include <drivers/cadence/cdns_uart.h> |
| 18 | #include <drivers/console.h> |
| 19 | #include <libfdt.h> |
| 20 | #include <plat_console.h> |
Prasad Kummari | e2d9dfe | 2023-11-03 16:47:26 +0530 | [diff] [blame] | 21 | #include <plat_fdt.h> |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 22 | |
| 23 | #include <platform_def.h> |
| 24 | #include <plat_private.h> |
| 25 | |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 26 | static console_t boot_console; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 27 | |
| 28 | #if (defined(XILINX_OF_BOARD_DTB_ADDR) && !IS_TFA_IN_OCM(BL31_BASE)) |
| 29 | /** |
| 30 | * get_baudrate() - Get the baudrate form DTB. |
| 31 | * @dtb: Address of the Device Tree Blob (DTB). |
| 32 | * |
| 33 | * Return: On success returns the baudrate; on failure returns an error. |
| 34 | */ |
| 35 | static int32_t get_baudrate(void *dtb) |
| 36 | { |
| 37 | int node; |
| 38 | int32_t ret = 0; |
| 39 | const char *prop, *path; |
| 40 | char *end; |
| 41 | int32_t baud_rate = 0; |
| 42 | |
| 43 | node = fdt_path_offset(dtb, "/secure-chosen"); |
| 44 | if (node < 0) { |
| 45 | node = fdt_path_offset(dtb, "/chosen"); |
| 46 | if (node < 0) { |
| 47 | ret = -FDT_ERR_NOTFOUND; |
| 48 | goto error; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | prop = fdt_getprop(dtb, node, "stdout-path", NULL); |
| 53 | if (prop == NULL) { |
| 54 | ret = -FDT_ERR_NOTFOUND; |
| 55 | goto error; |
| 56 | } |
| 57 | |
| 58 | /* Parse string serial0:115200n8 */ |
| 59 | path = strchr(prop, ':'); |
| 60 | if (!path) { |
| 61 | ret = -FDT_ERR_NOTFOUND; |
| 62 | goto error; |
| 63 | } else { |
| 64 | |
| 65 | baud_rate = strtoul(path + 1, &end, 10); |
| 66 | if (baud_rate == 0 && end == path) { |
| 67 | ERROR("Conversion error occurred: %d\n", baud_rate); |
| 68 | ret = -FDT_ERR_NOTFOUND; |
| 69 | goto error; |
| 70 | } |
| 71 | ret = baud_rate; |
| 72 | } |
| 73 | |
| 74 | error: |
| 75 | return ret; |
| 76 | } |
| 77 | |
| 78 | /** |
| 79 | * get_node_status() - Get the DTB node status. |
| 80 | * @dtb: Address of the Device Tree Blob (DTB). |
| 81 | * @node: Node address in the device tree. |
| 82 | * |
| 83 | * Return: On success, it returns 1; on failure, it returns an 0. |
| 84 | */ |
| 85 | static uint32_t get_node_status(void *dtb, int node) |
| 86 | { |
| 87 | const char *status_cell; |
| 88 | uint32_t status = 0; |
| 89 | |
| 90 | status_cell = fdt_getprop(dtb, node, "status", NULL); |
| 91 | if (!status_cell || strcmp(status_cell, "okay") == 0) { |
| 92 | status = 1; |
| 93 | } else { |
| 94 | status = 0; |
| 95 | } |
| 96 | |
| 97 | return status; |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * fdt_add_uart_info() - Add DTB information to a UART structure. |
| 102 | * @info: Pointer to the UART information structure. |
| 103 | * @node: Node address in the device tree. |
| 104 | * @dtb: Address of the Device Tree Blob(DTB). |
| 105 | * |
| 106 | * Return: On success, it returns 1; on failure, it returns an 0. |
| 107 | */ |
| 108 | static uint32_t fdt_add_uart_info(dt_uart_info_t *info, int node, void *dtb) |
| 109 | { |
| 110 | uintptr_t base_addr; |
| 111 | const char *com; |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 112 | int32_t ret = 0; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 113 | |
| 114 | com = fdt_getprop(dtb, node, "compatible", NULL); |
| 115 | if (com != NULL) { |
| 116 | strlcpy(info->compatible, com, sizeof(info->compatible)); |
| 117 | } else { |
| 118 | ERROR("Compatible property not found in DTB node\n"); |
| 119 | ret = -FDT_ERR_NOTFOUND; |
| 120 | goto error; |
| 121 | } |
| 122 | |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 123 | info->status = get_node_status(dtb, node); |
| 124 | if (info->status == 0) { |
| 125 | ERROR("Uart node is disabled in DTB\n"); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 126 | ret = -FDT_ERR_NOTFOUND; |
| 127 | goto error; |
| 128 | } |
| 129 | |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 130 | if (strncmp(info->compatible, DT_UART_DCC_COMPAT, strlen(DT_UART_DCC_COMPAT)) != 0) { |
| 131 | ret = fdt_get_reg_props_by_index(dtb, node, 0, &base_addr, NULL); |
| 132 | if (ret >= 0) { |
| 133 | info->base = base_addr; |
| 134 | } else { |
| 135 | ERROR("Failed to retrieve base address. Error code: %d\n", ret); |
| 136 | ret = -FDT_ERR_NOTFOUND; |
| 137 | goto error; |
| 138 | } |
| 139 | |
| 140 | info->baud_rate = get_baudrate(dtb); |
| 141 | } |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 142 | |
| 143 | error: |
| 144 | return ret; |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * fdt_get_uart_info() - Get the uart information form DTB. |
| 149 | * @info: Pointer to the UART information structure. |
| 150 | * |
| 151 | * Return: On success, it returns 0; on failure, it returns an error+reason. |
| 152 | */ |
| 153 | static int fdt_get_uart_info(dt_uart_info_t *info) |
| 154 | { |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 155 | int node = 0, ret = 0; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 156 | void *dtb = (void *)XILINX_OF_BOARD_DTB_ADDR; |
| 157 | |
Prasad Kummari | e2d9dfe | 2023-11-03 16:47:26 +0530 | [diff] [blame] | 158 | ret = is_valid_dtb(dtb); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 159 | if (ret < 0) { |
| 160 | ERROR("Invalid Device Tree at %p: error %d\n", dtb, ret); |
| 161 | ret = -FDT_ERR_NOTFOUND; |
| 162 | goto error; |
| 163 | } |
| 164 | |
| 165 | node = fdt_get_stdout_node_offset(dtb); |
| 166 | if (node < 0) { |
| 167 | ERROR("DT get stdout node failed : %d\n", node); |
| 168 | ret = -FDT_ERR_NOTFOUND; |
| 169 | goto error; |
| 170 | } |
| 171 | |
| 172 | ret = fdt_add_uart_info(info, node, dtb); |
| 173 | if (ret < 0) { |
| 174 | ERROR("Failed to add DT UART info: %d\n", ret); |
| 175 | ret = -FDT_ERR_NOTFOUND; |
| 176 | goto error; |
| 177 | } |
| 178 | |
| 179 | error: |
| 180 | return ret; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * check_fdt_uart_info() - Check early uart info with DTB uart info. |
| 185 | * @info: Pointer to the UART information structure. |
| 186 | * |
| 187 | * Return: On success, it returns 0; on failure, it returns an error+reason. |
| 188 | */ |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 189 | static int32_t check_fdt_uart_info(dt_uart_info_t *info) |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 190 | { |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 191 | int32_t ret = 0; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 192 | |
| 193 | if (info->status == 0) { |
| 194 | ret = -ENODEV; |
| 195 | goto error; |
| 196 | } |
| 197 | |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 198 | if ((info->base == boot_console.base) && |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 199 | (info->baud_rate == UART_BAUDRATE) && !CONSOLE_IS(dcc)) { |
| 200 | ret = -ENODEV; |
| 201 | goto error; |
| 202 | } |
| 203 | |
| 204 | error: |
| 205 | return ret; |
| 206 | } |
| 207 | |
| 208 | /** |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 209 | * console_end() - Unregister the console_t instance form the console list. |
| 210 | * @console: Pointer to the console information structure. |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 211 | */ |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 212 | static void console_end(console_t *console) |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 213 | { |
| 214 | if (CONSOLE_IS(dcc)) { |
Maheedhar Bollapalli | 238eb54 | 2024-09-23 09:04:23 +0000 | [diff] [blame^] | 215 | console_dcc_unregister(console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 216 | } else { |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 217 | if (console != NULL) { |
| 218 | console_flush(); |
| 219 | (void)console_unregister(console); |
| 220 | } |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 221 | } |
| 222 | } |
| 223 | |
| 224 | /** |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 225 | * register_console() - Registers the runtime uart with console list. |
| 226 | * @uart_base: UART base address |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 227 | * @clock: UART clock. |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 228 | * @baud_rate: UART buad rate |
| 229 | * @console: Pointer to the console information structure. |
| 230 | * @flags: console flags. |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 231 | */ |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 232 | static void register_console(uintptr_t uart_base, uint32_t clock, |
| 233 | uint32_t baud_rate, console_t *console, |
| 234 | uint32_t flags) |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 235 | { |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 236 | int32_t rc; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 237 | |
| 238 | #if defined(PLAT_zynqmp) |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 239 | rc = console_cdns_register(uart_base, |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 240 | clock, |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 241 | baud_rate, |
| 242 | console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 243 | #else |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 244 | rc = console_pl011_register(uart_base, |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 245 | clock, |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 246 | baud_rate, |
| 247 | console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 248 | #endif |
| 249 | if (rc == 0) { |
| 250 | panic(); |
| 251 | } |
| 252 | |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 253 | console_set_scope(console, flags); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 254 | } |
| 255 | |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 256 | /** |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 257 | * parse_uart_info() - Parse UART information from Device Tree Blob. |
| 258 | * @uart_info: Pointer to the UART information structure. |
| 259 | * |
| 260 | * Return: On success, it returns 0; on failure, it returns an error+reason; |
| 261 | */ |
| 262 | static int32_t parse_uart_info(dt_uart_info_t *uart_info) |
| 263 | { |
| 264 | int32_t rc = fdt_get_uart_info(uart_info); |
| 265 | |
| 266 | if (rc < 0) { |
| 267 | rc = -FDT_ERR_NOTFOUND; |
| 268 | } |
| 269 | return rc; |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * handle_dt_console() - Registers the DT console |
| 274 | * @uart_info: Pointer to the UART information structure. |
| 275 | * @console: Pointer to the console information structure. |
| 276 | * @clock: UART clock. |
| 277 | * @end_console: Pointer to the console information structure. |
| 278 | */ |
| 279 | static void handle_dt_console(dt_uart_info_t *uart_info, console_t *console, |
| 280 | uint32_t clock, console_t *end_console) |
| 281 | { |
| 282 | register_console(uart_info->base, clock, uart_info->baud_rate, |
| 283 | console, CONSOLE_FLAG_BOOT | |
| 284 | CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); |
| 285 | console_end(end_console); |
| 286 | INFO("DTB console setup\n"); |
| 287 | } |
| 288 | |
| 289 | |
| 290 | /** |
| 291 | * handle_dcc_console() - Registers the DCC console |
| 292 | * @console: Pointer to the console information structure. |
| 293 | */ |
| 294 | static void handle_dcc_console(console_t *console) |
| 295 | { |
Maheedhar Bollapalli | 238eb54 | 2024-09-23 09:04:23 +0000 | [diff] [blame^] | 296 | int32_t rc = console_dcc_register(console); |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 297 | |
| 298 | if (rc == 0) { |
| 299 | panic(); |
| 300 | } |
| 301 | console_end(console); |
| 302 | } |
| 303 | |
| 304 | /** |
Prasad Kummari | 00a6842 | 2024-03-07 15:10:04 +0530 | [diff] [blame] | 305 | * dt_console_init() - Initializes the DT console information. |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 306 | * @uart_info: Pointer to the UART information structure. |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 307 | * @console: Pointer to the console information structure. |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 308 | * @clock: UART clock. |
| 309 | * |
| 310 | * Return: On success, it returns 0; on failure, it returns an error+reason; |
| 311 | */ |
Prasad Kummari | 00a6842 | 2024-03-07 15:10:04 +0530 | [diff] [blame] | 312 | static int32_t dt_console_init(dt_uart_info_t *uart_info, |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 313 | console_t *console, |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 314 | uint32_t clock) |
| 315 | { |
| 316 | int32_t rc = 0; |
Prasad Kummari | f84a4c5 | 2024-03-07 16:01:55 +0530 | [diff] [blame] | 317 | static console_t dt_console; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 318 | |
| 319 | /* Parse UART information from Device Tree Blob (DTB) */ |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 320 | rc = parse_uart_info(uart_info); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 321 | if (rc < 0) { |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 322 | goto error; |
| 323 | } |
| 324 | |
| 325 | rc = check_fdt_uart_info(uart_info); |
| 326 | if (rc < 0) { |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 327 | goto error; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | if (strncmp(uart_info->compatible, DT_UART_COMPAT, |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 331 | strlen(DT_UART_COMPAT)) == 0) { |
| 332 | handle_dt_console(uart_info, &dt_console, clock, console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 333 | } else if (strncmp(uart_info->compatible, DT_UART_DCC_COMPAT, |
Prasad Kummari | d989229 | 2024-03-08 14:26:25 +0530 | [diff] [blame] | 334 | strlen(DT_UART_DCC_COMPAT)) == 0) { |
| 335 | handle_dcc_console(console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 336 | } else { |
| 337 | WARN("BL31: No console device found in DT.\n"); |
| 338 | } |
| 339 | |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 340 | error: |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 341 | return rc; |
| 342 | } |
| 343 | #endif |
| 344 | |
| 345 | void setup_console(void) |
| 346 | { |
Prasad Kummari | 8eb6a1d | 2023-11-08 16:50:03 +0530 | [diff] [blame] | 347 | int32_t rc; |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 348 | uint32_t uart_clk = get_uart_clk(); |
| 349 | |
| 350 | #if defined(PLAT_zynqmp) |
| 351 | if (CONSOLE_IS(cadence) || (CONSOLE_IS(cadence1))) { |
| 352 | rc = console_cdns_register(UART_BASE, |
| 353 | uart_clk, |
| 354 | UART_BAUDRATE, |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 355 | &boot_console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 356 | if (rc == 0) { |
| 357 | panic(); |
| 358 | } |
| 359 | |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 360 | console_set_scope(&boot_console, CONSOLE_FLAG_BOOT | |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 361 | CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); |
| 362 | } |
| 363 | #else |
| 364 | if (CONSOLE_IS(pl011) || (CONSOLE_IS(pl011_1))) { |
| 365 | /* Initialize the console to provide early debug support */ |
| 366 | rc = console_pl011_register((uint32_t)UART_BASE, |
| 367 | uart_clk, |
| 368 | (uint32_t)UART_BAUDRATE, |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 369 | &boot_console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 370 | if (rc == 0) { |
| 371 | panic(); |
| 372 | } |
| 373 | |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 374 | console_set_scope(&boot_console, CONSOLE_FLAG_BOOT | |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 375 | CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); |
| 376 | } |
| 377 | #endif |
| 378 | if (CONSOLE_IS(dcc)) { |
| 379 | /* Initialize the dcc console for debug */ |
Maheedhar Bollapalli | 238eb54 | 2024-09-23 09:04:23 +0000 | [diff] [blame^] | 380 | rc = console_dcc_register(&boot_console); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 381 | if (rc == 0) { |
| 382 | panic(); |
| 383 | } |
| 384 | } |
| 385 | INFO("BL31: Early console setup\n"); |
| 386 | |
| 387 | #if (defined(XILINX_OF_BOARD_DTB_ADDR) && !IS_TFA_IN_OCM(BL31_BASE)) |
| 388 | static dt_uart_info_t uart_info = {0}; |
| 389 | |
Prasad Kummari | 00a6842 | 2024-03-07 15:10:04 +0530 | [diff] [blame] | 390 | /* Initialize the DTB console using UART information from the DTB */ |
Prasad Kummari | a542b9c | 2024-03-07 15:28:11 +0530 | [diff] [blame] | 391 | rc = dt_console_init(&uart_info, &boot_console, uart_clk); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 392 | if (rc < 0) { |
Prasad Kummari | 00a6842 | 2024-03-07 15:10:04 +0530 | [diff] [blame] | 393 | ERROR("Failed to initialize DT console: %d\n", rc); |
Prasad Kummari | 3923462 | 2023-09-19 22:15:05 +0530 | [diff] [blame] | 394 | } |
| 395 | #endif |
| 396 | } |