Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 7 | #include <platform_def.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | |
| 9 | #include <drivers/console.h> |
| 10 | #include <drivers/ti/uart/uart_16550.h> |
| 11 | |
| 12 | #include <k3_console.h> |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 13 | |
Andrew Davis | b910470 | 2022-11-15 18:04:41 -0600 | [diff] [blame] | 14 | void k3_console_setup(void) |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 15 | { |
Andre Przywara | 98b5a11 | 2020-01-25 00:58:35 +0000 | [diff] [blame] | 16 | static console_t console; |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 17 | |
Andrew F. Davis | 42c277b | 2019-01-22 13:36:48 -0600 | [diff] [blame] | 18 | console_16550_register(K3_USART_BASE, K3_USART_CLK_SPEED, |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 19 | K3_USART_BAUD, &console); |
Andrew Davis | b910470 | 2022-11-15 18:04:41 -0600 | [diff] [blame] | 20 | |
| 21 | console_set_scope(&console, CONSOLE_FLAG_BOOT | |
| 22 | CONSOLE_FLAG_RUNTIME | |
| 23 | CONSOLE_FLAG_CRASH); |
Nishanth Menon | ce97604 | 2016-10-14 01:13:44 +0000 | [diff] [blame] | 24 | } |