qemu_console.c 504 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <platform_def.h>
  7. #include <drivers/console.h>
  8. #include <drivers/arm/pl011.h>
  9. static console_t console;
  10. void qemu_console_init(void)
  11. {
  12. (void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
  13. PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
  14. PLAT_QEMU_CONSOLE_BAUDRATE, &console);
  15. console_set_scope(&console, CONSOLE_FLAG_BOOT |
  16. CONSOLE_FLAG_RUNTIME);
  17. }