This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit dcb1334bb7d05e07f993d3d7e80c759fce17acfc Author: Saravanan Sekar <[email protected]> AuthorDate: Tue Nov 10 12:23:06 2026 +0530 arch/tricore: Move the UART option to the AURIX Kconfig. The ASCLIN UART driver is common to TC3xx and TC4xx, but each family has its own option for it, TC3XX_UART0 and TC4XX_UART0, which the driver has to combine. Replace both with TRICORE_UART0 in a new src/common/aurix/Kconfig, for the options of the common AURIX drivers. It keeps the default of y, so the board configurations do not change. Signed-off-by: Saravanan Sekar <[email protected]> --- arch/tricore/Kconfig | 2 ++ arch/tricore/src/common/aurix/Kconfig | 16 ++++++++++++++++ arch/tricore/src/common/aurix/tricore_serial.c | 14 +++++--------- arch/tricore/src/tc3xx/Kconfig | 12 ------------ arch/tricore/src/tc4xx/Kconfig | 12 ------------ 5 files changed, 23 insertions(+), 33 deletions(-) diff --git a/arch/tricore/Kconfig b/arch/tricore/Kconfig index 6937fe665ad..fc2ea7c29e8 100644 --- a/arch/tricore/Kconfig +++ b/arch/tricore/Kconfig @@ -180,6 +180,8 @@ config TRICORE_TRAP_ALERT Print the trap name and reason before the trap panics. The panic message has the trap class and TIN in any case. +source "arch/tricore/src/common/aurix/Kconfig" + if ARCH_CHIP_TC3X source "arch/tricore/src/tc3xx/Kconfig" endif diff --git a/arch/tricore/src/common/aurix/Kconfig b/arch/tricore/src/common/aurix/Kconfig new file mode 100644 index 00000000000..7c56d5f50ce --- /dev/null +++ b/arch/tricore/src/common/aurix/Kconfig @@ -0,0 +1,16 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +menu "AURIX Peripheral Support" + +config TRICORE_UART0 + bool "ASCLIN0 UART" + default y + select UART0_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + ---help--- + Use ASCLIN0 as UART0, on the P14.1 RX and P14.0 TX pins. + +endmenu diff --git a/arch/tricore/src/common/aurix/tricore_serial.c b/arch/tricore/src/common/aurix/tricore_serial.c index 99db36be1d2..e7f4d6660c4 100644 --- a/arch/tricore/src/common/aurix/tricore_serial.c +++ b/arch/tricore/src/common/aurix/tricore_serial.c @@ -59,10 +59,6 @@ * Pre-processor Definitions ****************************************************************************/ -#if defined(CONFIG_TC3XX_UART0) || defined(CONFIG_TC4XX_UART0) -# define HAVE_UART0 1 -#endif - /* Bit timing: fPD is fASCLINF, 16 times oversampling, sample point 8 */ #define ASCLIN_PRESCALER 1 @@ -87,7 +83,7 @@ * be ttyS0. If there is no console then will use the lowest numbered UART. */ -#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(HAVE_UART0) +#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_TRICORE_UART0) # define HAVE_SERIAL_CONSOLE 1 #else # undef CONFIG_UART0_SERIAL_CONSOLE @@ -105,7 +101,7 @@ #else # undef CONSOLE_DEV /* No console */ # undef CONFIG_UART0_SERIAL_CONSOLE -# if defined(HAVE_UART0) +# if defined(CONFIG_TRICORE_UART0) # define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */ # define SERIAL_CONSOLE 1 # else @@ -114,7 +110,7 @@ #endif #undef HAVE_UART_DEVICE -#if defined(HAVE_UART0) +#if defined(CONFIG_TRICORE_UART0) # define HAVE_UART_DEVICE 1 #endif @@ -180,12 +176,12 @@ static const struct uart_ops_s g_uart_ops = /* I/O buffers */ -#ifdef HAVE_UART0 +#ifdef CONFIG_TRICORE_UART0 static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE]; static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE]; #endif -#ifdef HAVE_UART0 +#ifdef CONFIG_TRICORE_UART0 static struct up_dev_s g_uart0priv = { diff --git a/arch/tricore/src/tc3xx/Kconfig b/arch/tricore/src/tc3xx/Kconfig index 66ca027eeca..c8e339c6135 100644 --- a/arch/tricore/src/tc3xx/Kconfig +++ b/arch/tricore/src/tc3xx/Kconfig @@ -38,15 +38,3 @@ comment "TC3XX Configuration Options" config CPU_CLOCK_FREQUENCY int "CPU clock frequency (Hz)" default 300000000 - -menu "TC3XX Peripheral Support" - -# These are the peripheral selections proper - -config TC3XX_UART0 - bool "TC3XX UART0" - default y - select UART0_SERIALDRIVER - select ARCH_HAVE_SERIAL_TERMIOS - -endmenu diff --git a/arch/tricore/src/tc4xx/Kconfig b/arch/tricore/src/tc4xx/Kconfig index 5d9aa9949e0..0371e84a87d 100644 --- a/arch/tricore/src/tc4xx/Kconfig +++ b/arch/tricore/src/tc4xx/Kconfig @@ -38,15 +38,3 @@ comment "TC4XX Configuration Options" config CPU_CLOCK_FREQUENCY int "CPU clock frequency (Hz)" default 500000000 - -menu "TC4XX Peripheral Support" - -# These are the peripheral selections proper - -config TC4XX_UART0 - bool "TC4XX UART0" - default y - select UART0_SERIALDRIVER - select ARCH_HAVE_SERIAL_TERMIOS - -endmenu
