From 9e59b0b43b006ed48cf90ad4fb001b8687faa30e Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Wed, 24 Jul 2024 15:07:25 +0800 Subject: [PATCH] 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 --- arch/risc-v/src/qemu-rv/qemu_rv_start.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_start.c b/arch/risc-v/src/qemu-rv/qemu_rv_start.c index 9381be93bb..19188b9d0c 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_start.c +++ b/arch/risc-v/src/qemu-rv/qemu_rv_start.c @@ -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 }