Skip to content

Commit

Permalink
riscv/qemu: guard u16550 uses
Browse files Browse the repository at this point in the history
This guards the uses for u16550 serial initialization, just in case
that no u16550 is selected for console purposes.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 committed Jul 24, 2024
1 parent 31399e9 commit f970b57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/risc-v/src/qemu-rv/qemu_rv_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,14 @@ void qemu_rv_start(int mhartid, const char *dtb)

void riscv_earlyserialinit(void)
{
#ifdef HAVE_16550_CONSOLE
u16550_earlyserialinit();
#endif
}

void riscv_serialinit(void)
{
#ifdef HAVE_16550_CONSOLE
u16550_serialinit();
#endif
}

0 comments on commit f970b57

Please sign in to comment.