You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/23 15:08:39 UTC

[incubator-nuttx] 01/04: arch: undef USE_SERIALDRIVER if CONFIG_CONSOLE_SYSLOG

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr360
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7a25081ede76881cbd81cb7c57ca3ec4722b2adf
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Sat Feb 22 23:01:12 2020 +0800

    arch: undef USE_SERIALDRIVER if CONFIG_CONSOLE_SYSLOG
    
    the wrong is introduced from:
    commit f982ee43db683b7e34b154f5bc8c60a58b956820
    Author: Xiang Xiao <xi...@xiaomi.com>
    Date:   Tue Feb 18 09:55:04 2020 +0800
    
        drivers/serial: Remove the lowconsole driver
    
        Replace with the syslog console driver which has more capability than lowconsole
    
    Change-Id: I27447a069285c26edb0192b2747dbf2180d2628e
    Signed-off-by: liuhaitao <li...@xiaomi.com>
---
 arch/arm/src/common/up_internal.h     | 3 +++
 arch/avr/src/at32uc3/at32uc3_config.h | 5 ++++-
 arch/avr/src/at90usb/at90usb_config.h | 5 ++++-
 arch/avr/src/atmega/atmega_config.h   | 5 ++++-
 arch/hc/src/common/up_internal.h      | 9 +++++++--
 arch/mips/src/common/up_internal.h    | 9 +++++++--
 arch/misoc/src/lm32/lm32.h            | 9 +++++++--
 arch/misoc/src/minerva/minerva.h      | 9 +++++++--
 arch/or1k/src/common/up_internal.h    | 9 +++++++--
 arch/renesas/src/common/up_internal.h | 9 +++++++--
 arch/risc-v/src/common/up_internal.h  | 9 +++++++--
 arch/x86/src/common/up_internal.h     | 9 +++++++--
 arch/xtensa/src/common/xtensa.h       | 9 +++++++--
 arch/z16/src/common/up_internal.h     | 9 +++++++--
 14 files changed, 85 insertions(+), 23 deletions(-)

diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h
index 71d08ab..90cc2bf 100644
--- a/arch/arm/src/common/up_internal.h
+++ b/arch/arm/src/common/up_internal.h
@@ -64,6 +64,9 @@
 #  if defined(CONFIG_ARM_LWL_CONSOLE)
 #    undef  USE_SERIALDRIVER
 #    undef  USE_EARLYSERIALINIT
+#  elif defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
 #  else
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
diff --git a/arch/avr/src/at32uc3/at32uc3_config.h b/arch/avr/src/at32uc3/at32uc3_config.h
index 2a5d1e0..845f9f5 100644
--- a/arch/avr/src/at32uc3/at32uc3_config.h
+++ b/arch/avr/src/at32uc3/at32uc3_config.h
@@ -153,7 +153,10 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  if defined(HAVE_RS232_DEVICE)
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  elif defined(HAVE_RS232_DEVICE)
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
 #  else
diff --git a/arch/avr/src/at90usb/at90usb_config.h b/arch/avr/src/at90usb/at90usb_config.h
index 91b172e..1f0f184 100644
--- a/arch/avr/src/at90usb/at90usb_config.h
+++ b/arch/avr/src/at90usb/at90usb_config.h
@@ -72,7 +72,10 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  if defined(HAVE_USART_DEVICE)
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  elif defined(HAVE_USART_DEVICE)
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
 #  else
diff --git a/arch/avr/src/atmega/atmega_config.h b/arch/avr/src/atmega/atmega_config.h
index f764b8a..ffe6a40 100644
--- a/arch/avr/src/atmega/atmega_config.h
+++ b/arch/avr/src/atmega/atmega_config.h
@@ -78,7 +78,10 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  if defined(HAVE_USART_DEVICE)
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  elif defined(HAVE_USART_DEVICE)
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
 #  else
diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/up_internal.h
index 3f84559..d85ba34 100644
--- a/arch/hc/src/common/up_internal.h
+++ b/arch/hc/src/common/up_internal.h
@@ -61,8 +61,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/mips/src/common/up_internal.h b/arch/mips/src/common/up_internal.h
index 5de04e5..9a10068 100644
--- a/arch/mips/src/common/up_internal.h
+++ b/arch/mips/src/common/up_internal.h
@@ -58,8 +58,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/misoc/src/lm32/lm32.h b/arch/misoc/src/lm32/lm32.h
index fab887b..64c0722 100644
--- a/arch/misoc/src/lm32/lm32.h
+++ b/arch/misoc/src/lm32/lm32.h
@@ -78,8 +78,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/misoc/src/minerva/minerva.h b/arch/misoc/src/minerva/minerva.h
index 6c73a7b..ff9bdb0 100644
--- a/arch/misoc/src/minerva/minerva.h
+++ b/arch/misoc/src/minerva/minerva.h
@@ -78,8 +78,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/or1k/src/common/up_internal.h b/arch/or1k/src/common/up_internal.h
index ed5cfe0..3a76708 100644
--- a/arch/or1k/src/common/up_internal.h
+++ b/arch/or1k/src/common/up_internal.h
@@ -61,8 +61,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/renesas/src/common/up_internal.h b/arch/renesas/src/common/up_internal.h
index 03f0067..a83a4df 100644
--- a/arch/renesas/src/common/up_internal.h
+++ b/arch/renesas/src/common/up_internal.h
@@ -66,8 +66,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/risc-v/src/common/up_internal.h b/arch/risc-v/src/common/up_internal.h
index 50a5b36..283ea28 100644
--- a/arch/risc-v/src/common/up_internal.h
+++ b/arch/risc-v/src/common/up_internal.h
@@ -86,8 +86,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /****************************************************************************
diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/up_internal.h
index fcd06cc..11f6353 100644
--- a/arch/x86/src/common/up_internal.h
+++ b/arch/x86/src/common/up_internal.h
@@ -60,8 +60,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h
index b9a4d5f..c50b269 100644
--- a/arch/xtensa/src/common/xtensa.h
+++ b/arch/xtensa/src/common/xtensa.h
@@ -61,8 +61,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may
diff --git a/arch/z16/src/common/up_internal.h b/arch/z16/src/common/up_internal.h
index 4645222..3de83e7 100644
--- a/arch/z16/src/common/up_internal.h
+++ b/arch/z16/src/common/up_internal.h
@@ -67,8 +67,13 @@
 #  undef  USE_SERIALDRIVER
 #  undef  USE_EARLYSERIALINIT
 #else
-#  define USE_SERIALDRIVER 1
-#  define USE_EARLYSERIALINIT 1
+#  if defined(CONFIG_CONSOLE_SYSLOG)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
+#  else
+#    define USE_SERIALDRIVER 1
+#    define USE_EARLYSERIALINIT 1
+#  endif
 #endif
 
 /* If some other device is used as the console, then the serial driver may