Michalis Pappas | cca6cb7 | 2018-03-04 15:43:38 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 6 | |
Michalis Pappas | cca6cb7 | 2018-03-04 15:43:38 +0800 | [diff] [blame] | 7 | #include <platform_def.h> |
| 8 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | #include <drivers/console.h> |
| 10 | #include <drivers/arm/pl011.h> |
| 11 | |
Andre Przywara | 2b1b1a5 | 2020-01-25 00:58:35 +0000 | [diff] [blame] | 12 | static console_t console; |
Michalis Pappas | cca6cb7 | 2018-03-04 15:43:38 +0800 | [diff] [blame] | 13 | |
| 14 | void qemu_console_init(void) |
| 15 | { |
Michalis Pappas | cca6cb7 | 2018-03-04 15:43:38 +0800 | [diff] [blame] | 16 | (void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE, |
| 17 | PLAT_QEMU_BOOT_UART_CLK_IN_HZ, |
| 18 | PLAT_QEMU_CONSOLE_BAUDRATE, &console); |
Michalis Pappas | abd0836 | 2018-03-27 12:32:31 +0800 | [diff] [blame] | 19 | |
Andre Przywara | 2b1b1a5 | 2020-01-25 00:58:35 +0000 | [diff] [blame] | 20 | console_set_scope(&console, CONSOLE_FLAG_BOOT | |
Michalis Pappas | abd0836 | 2018-03-27 12:32:31 +0800 | [diff] [blame] | 21 | CONSOLE_FLAG_RUNTIME); |
Michalis Pappas | cca6cb7 | 2018-03-04 15:43:38 +0800 | [diff] [blame] | 22 | } |
| 23 | |