riscv/qemu: guard u16550 uses

This guards the uses for u16550 serial initialization, just in case
that no u16550 is configured.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-07-24 15:07:25 +08:00 committed by Xiang Xiao
parent 3fecf46097
commit 9e59b0b43b

View File

@ -184,10 +184,14 @@ cpux:
void riscv_earlyserialinit(void)
{
#ifdef CONFIG_16550_UART
u16550_earlyserialinit();
#endif
}
void riscv_serialinit(void)
{
#ifdef CONFIG_16550_UART
u16550_serialinit();
#endif
}