blob: 542fa7befe321c3761609963e0305282702a93c2 [file] [log] [blame]
Ghennadi Procopciuca9fee052024-01-30 16:19:47 +02001/*
2 * Copyright 2024 NXP
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <common/debug.h>
8#include <linflex.h>
9#include <plat_console.h>
10#include <platform_def.h>
11
12void console_s32g2_register(void)
13{
Ghennadi Procopciucd3d6f542024-05-10 15:17:57 +030014 static console_t s32g2_console = {
15 .next = NULL,
16 .flags = 0u,
17 };
Ghennadi Procopciuca9fee052024-01-30 16:19:47 +020018 int ret;
19
Ghennadi Procopciuca9fee052024-01-30 16:19:47 +020020 ret = console_linflex_register(UART_BASE, UART_CLOCK_HZ,
21 UART_BAUDRATE, &s32g2_console);
22 if (ret == 0) {
23 panic();
24 }
25
26 console_set_scope(&s32g2_console,
27 CONSOLE_FLAG_BOOT | CONSOLE_FLAG_CRASH |
28 CONSOLE_FLAG_TRANSLATE_CRLF);
29}