From 54a4eb01cea3d60c38a070c49e45471249ff4efd Mon Sep 17 00:00:00 2001 From: Eero Nurkkala Date: Thu, 20 Jan 2022 11:05:30 +0200 Subject: [PATCH] risc-v/mpfs: avoid OpenSBI redefinition conflicts This drops the dependency to riscv_internal.h which ensures less redefinition conflicts. OpenSBI declares some of the variables again which are spread in many NuttX files. Signed-off-by: Eero Nurkkala --- arch/risc-v/src/mpfs/mpfs_opensbi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/risc-v/src/mpfs/mpfs_opensbi.c b/arch/risc-v/src/mpfs/mpfs_opensbi.c index bbd6a6aa7f..3972a9f028 100644 --- a/arch/risc-v/src/mpfs/mpfs_opensbi.c +++ b/arch/risc-v/src/mpfs/mpfs_opensbi.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -118,6 +117,16 @@ static int mpfs_irqchip_init(bool cold_boot); static int mpfs_ipi_init(bool cold_boot); static int mpfs_timer_init(bool cold_boot); +/**************************************************************************** + * Extern Function Declarations + ****************************************************************************/ + +/* riscv_internal.h cannot be included due to a number of redefinition + * conflicts. Thus, define the riscv_lowputc() with the extern definition. + */ + +extern void riscv_lowputc(char ch); + /**************************************************************************** * Private Data ****************************************************************************/