From b4cf5f5dabcd50b75bcd71e83f110a3e5525f293 Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Sun, 23 Feb 2020 18:12:07 +0800 Subject: [PATCH] arch: refine up_serialinit/up_earlyserialinit/rpmsg_serialinit --- arch/arm/src/common/up_internal.h | 6 ------ arch/avr/src/common/up_internal.h | 7 +++++-- arch/hc/src/common/up_internal.h | 7 +++++-- arch/mips/src/common/up_internal.h | 12 ++++++++++-- arch/or1k/src/common/up_internal.h | 6 ------ arch/renesas/src/common/up_internal.h | 7 +++++-- arch/risc-v/src/common/up_internal.h | 6 ------ arch/sim/src/sim/up_internal.h | 2 -- arch/x86/src/common/up_internal.h | 7 +++++-- arch/z16/src/common/up_internal.h | 7 ++++--- 10 files changed, 34 insertions(+), 33 deletions(-) diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index 90cc2bfbc3..1c8bbf4593 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -430,20 +430,14 @@ void up_lowputs(const char *str); #ifdef USE_SERIALDRIVER void up_serialinit(void); -#else -# define up_serialinit() #endif #ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); -#else -# define up_earlyserialinit() #endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif #ifdef CONFIG_ARM_LWL_CONSOLE diff --git a/arch/avr/src/common/up_internal.h b/arch/avr/src/common/up_internal.h index ae16ec2030..ae89d5457c 100644 --- a/arch/avr/src/common/up_internal.h +++ b/arch/avr/src/common/up_internal.h @@ -150,13 +150,16 @@ void up_lowinit(void); /* Defined in chip/xxx_serial.c */ +#ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); +#endif + +#ifdef USE_SERIALDRIVER void up_serialinit(void); +#endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* Defined in chip/xxx_ethernet.c */ diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h index d85ba34054..0943947f8b 100644 --- a/arch/hc/src/common/up_internal.h +++ b/arch/hc/src/common/up_internal.h @@ -152,13 +152,16 @@ void up_sigdeliver(void); /* Debug output */ +#ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); +#endif + +#ifdef USE_SERIALDRIVER void up_serialinit(void); +#endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif void up_lowputc(char ch); diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/up_internal.h index 9a100687ea..11916eb06e 100644 --- a/arch/mips/src/common/up_internal.h +++ b/arch/mips/src/common/up_internal.h @@ -242,10 +242,18 @@ void up_addregion(void); /* Serial output */ void up_lowputc(char ch); -void up_earlyserialinit(void); -void up_serialinit(void); +#ifdef USE_EARLYSERIALINIT +void up_earlyserialinit(void); +#endif + +#ifdef USE_SERIALDRIVER +void up_serialinit(void); +#endif + +#ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); +#endif /* Network */ diff --git a/arch/or1k/src/common/up_internal.h b/arch/or1k/src/common/up_internal.h index 3a76708f05..099b6306b6 100644 --- a/arch/or1k/src/common/up_internal.h +++ b/arch/or1k/src/common/up_internal.h @@ -285,20 +285,14 @@ void up_lowputs(const char *str); #ifdef USE_SERIALDRIVER void up_serialinit(void); -#else -# define up_serialinit() #endif #ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); -#else -# define up_earlyserialinit() #endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* DMA **********************************************************************/ diff --git a/arch/renesas/src/common/up_internal.h b/arch/renesas/src/common/up_internal.h index a83a4df179..ca74ca4319 100644 --- a/arch/renesas/src/common/up_internal.h +++ b/arch/renesas/src/common/up_internal.h @@ -158,13 +158,16 @@ void up_vectorfiq(void); /* Defined in xyz_serial.c */ +#ifdef USE_EARLYSERIALINIT void up_earlyconsoleinit(void); +#endif + +#ifdef USE_SERIALDRIVER void up_consoleinit(void); +#endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* Defined in xyz_watchdog.c */ diff --git a/arch/risc-v/src/common/up_internal.h b/arch/risc-v/src/common/up_internal.h index 283ea28507..b28264c8c7 100644 --- a/arch/risc-v/src/common/up_internal.h +++ b/arch/risc-v/src/common/up_internal.h @@ -190,20 +190,14 @@ void up_lowputs(const char *str); #ifdef USE_SERIALDRIVER void up_serialinit(void); -#else -# define up_serialinit() #endif #ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); -#else -# define up_earlyserialinit() #endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* The OS start routine **************************************************/ diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/up_internal.h index e57538ee59..b2ff25bb03 100644 --- a/arch/sim/src/sim/up_internal.h +++ b/arch/sim/src/sim/up_internal.h @@ -251,8 +251,6 @@ void up_timer_update(void); #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* up_devconsole.c **********************************************************/ diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h index 11f63535e3..3f7026be3d 100644 --- a/arch/x86/src/common/up_internal.h +++ b/arch/x86/src/common/up_internal.h @@ -195,13 +195,16 @@ void up_addregion(void); /* Defined in xyz_serial.c */ +#ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void); +#endif + +#ifdef USE_SERIALDRIVER void up_serialinit(void); +#endif #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* Defined in xyz_watchdog.c */ diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h index 3de83e7008..092713848d 100644 --- a/arch/z16/src/common/up_internal.h +++ b/arch/z16/src/common/up_internal.h @@ -145,14 +145,15 @@ void up_addregion(void); /* Defined in xyz_serial.c */ #ifdef USE_SERIALDRIVER -void up_earlyserialinit(void); void up_serialinit(void); #endif +#ifdef USE_EARLYSERIALINIT +void up_earlyserialinit(void); +#endif + #ifdef CONFIG_RPMSG_UART void rpmsg_serialinit(void); -#else -# define rpmsg_serialinit() #endif /* Defined in xyz_irq.c */