This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 151fec4e98ef6ebfb7674c7409cf563dd26a8310 Author: SPRESENSE <41312067+sprese...@users.noreply.github.com> AuthorDate: Wed May 19 17:04:41 2021 +0900 arch: cxd56xx: Do not re-initialize the console for subcore If the subcore configuration, which is mainly used in the Spresense Arduino environment, is enabled, the serial console has been already initialized by maincore. Then, don't need to re-initialize the UART1 serial driver. --- arch/arm/src/cxd56xx/cxd56_serial.c | 11 +++++++++++ arch/arm/src/cxd56xx/cxd56_start.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/cxd56xx/cxd56_serial.c b/arch/arm/src/cxd56xx/cxd56_serial.c index 6ef147a..4f62145f 100644 --- a/arch/arm/src/cxd56xx/cxd56_serial.c +++ b/arch/arm/src/cxd56xx/cxd56_serial.c @@ -460,6 +460,17 @@ static int up_setup(FAR struct uart_dev_s *dev) uint32_t lcr; uint32_t cr; +#ifdef CONFIG_CXD56_SUBCORE + if (priv->id == 1) + { + /* In case of SUBCORE, UART1 has been already initialized, + * then we don't need to do anything. + */ + + return OK; + } +#endif + cxd56_uart_setup(priv->id); /* Init HW */ diff --git a/arch/arm/src/cxd56xx/cxd56_start.c b/arch/arm/src/cxd56xx/cxd56_start.c index 0518be6..d85f484 100644 --- a/arch/arm/src/cxd56xx/cxd56_start.c +++ b/arch/arm/src/cxd56xx/cxd56_start.c @@ -303,7 +303,9 @@ void __start(void) putreg32(0, CXD56_EXCCONF_BASE + 0); +#ifndef CONFIG_CXD56_SUBCORE cxd56_lowsetup(); +#endif showprogress('A'); /* Clear .bss. We'll do this inline (vs. calling memset) just to be @@ -327,7 +329,7 @@ void __start(void) /* Perform early serial initialization */ -#ifdef USE_EARLYSERIALINIT +#if defined(USE_EARLYSERIALINIT) && !defined(CONFIG_CXD56_SUBCORE) arm_earlyserialinit(); #endif showprogress('E');