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

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 0e01836f094e9d74caa24ae02bb9854dbc975ac6
Author: raiden00pl <[email protected]>
AuthorDate: Thu Sep 21 13:59:38 2023 +0200

    serial: add an option that selects uart rpmsg as console
---
 arch/arm/src/common/arm_internal.h     |  3 +++
 arch/arm64/src/common/arm64_internal.h |  3 +++
 drivers/serial/Kconfig                 | 10 ++++++++++
 3 files changed, 16 insertions(+)

diff --git a/arch/arm/src/common/arm_internal.h 
b/arch/arm/src/common/arm_internal.h
index b32b24d3aa..fbcb5887f5 100644
--- a/arch/arm/src/common/arm_internal.h
+++ b/arch/arm/src/common/arm_internal.h
@@ -57,6 +57,9 @@
 #  elif defined(CONFIG_SERIAL_RTT_CONSOLE)
 #    undef  USE_SERIALDRIVER
 #    undef  USE_EARLYSERIALINIT
+#  elif defined(CONFIG_RPMSG_UART_CONSOLE)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
 #  else
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
diff --git a/arch/arm64/src/common/arm64_internal.h 
b/arch/arm64/src/common/arm64_internal.h
index abe0320404..5ead8ca714 100644
--- a/arch/arm64/src/common/arm64_internal.h
+++ b/arch/arm64/src/common/arm64_internal.h
@@ -58,6 +58,9 @@
 #  elif defined(CONFIG_SERIAL_RTT_CONSOLE)
 #    undef  USE_SERIALDRIVER
 #    undef  USE_EARLYSERIALINIT
+#  elif defined(CONFIG_RPMSG_UART_CONSOLE)
+#    undef  USE_SERIALDRIVER
+#    undef  USE_EARLYSERIALINIT
 #  else
 #    define USE_SERIALDRIVER 1
 #    define USE_EARLYSERIALINIT 1
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 44e3005651..6b21c8e624 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -81,6 +81,16 @@ config RPMSG_UART
        select SERIAL_REMOVABLE
        select SERIAL_IFLOWCONTROL
 
+config RPMSG_UART_CONSOLE
+       bool "UART rpmsg console support"
+       default n
+       depends on RPMSG_UART
+       ---help---
+               Register the UART rpmsg device as /dev/console so that is will 
be used
+               as the console device.
+               NOTE: support for this option must be implemented in the board 
logic by
+               setting the \"isconsole\" argument in the uart_rpmsg_init() 
function to true.
+
 #
 # Standard serial driver configuration
 #

Reply via email to