drivers: serial: nrfx_uarte: Deprecate non-legacy shim

Some time ago a new shim for nRF UARTE was added (uart_nrfx_uarte2.c)
which used nrfx_uarte.c driver underneath. It was supposed to support
nrf54x platforms. However, later on legacy driver (uart_nrfx_uarte.c)
was extended to support nrf54x platforms and it takes less code size,
has better performance and more features. Shim uart_nrfx_uarte2 will
no longer be supported. As new shim is the default and there is a
Kconfig to pick the legacy shim (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y)
it cannot be deprecated in the normal way. Additional Kconfig option
is created (DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM) which is enabled
if CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n and it selects DEPRECATED.
A warning was also added to the CMakeLists.txt.

Patch removes use CONFIG_UART_NRFX_UARTE_LEGACY_SHIM in tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-11-18 17:42:52 +01:00 committed by Benjamin Cabé
parent bd9249457a
commit 70118c06a5
6 changed files with 11 additions and 22 deletions

View file

@ -93,6 +93,8 @@ if (CONFIG_UART_NRFX_UARTE)
if (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM)
zephyr_library_sources(uart_nrfx_uarte.c)
else()
message(DEPRECATION
"Do not set CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n as this option is deprecated.")
zephyr_library_sources(uart_nrfx_uarte2.c)
endif()
endif()

View file

@ -32,6 +32,8 @@ config UART_NRFX_UARTE_LEGACY_SHIM
bool "Legacy UARTE shim"
depends on UART_NRFX_UARTE
default y
help
Disabling this option is deprecated.
config UART_NRFX_UARTE_ENHANCED_RX
bool "Enhanced RX handling"

View file

@ -197,4 +197,9 @@ config NRF_PLATFORM_HALTIUM
this option. This allows to easily enable common functionality on
SoCs based on the Haltium platform.
config DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM
bool
default y if !UART_NRFX_UARTE_LEGACY_SHIM
select DEPRECATED
endif # SOC_FAMILY_NORDIC_NRF

View file

@ -25,20 +25,6 @@ tests:
platform_allow: nucleo_h743zi
integration_platforms:
- nucleo_h743zi
drivers.uart.async_api.nrf_uarte_new:
platform_allow:
- nrf52840dk/nrf52840
- nrf52_bsim
- nrf5340bsim/nrf5340/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
- nrf54l15bsim/nrf54l15/cpuapp
filter: CONFIG_SERIAL_SUPPORT_ASYNC
harness: ztest
harness_config:
fixture: gpio_loopback
depends_on: gpio
extra_configs:
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n
drivers.uart.async_api.nrf_uart:
filter: CONFIG_SERIAL_SUPPORT_ASYNC
harness: ztest

View file

@ -1 +0,0 @@
CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n

View file

@ -23,14 +23,12 @@ tests:
- CONFIG_UART_INTERRUPT_DRIVEN=n
- CONFIG_UART_ASYNC_API=n
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
drivers.uart.pm.no_rxpin:
extra_configs:
- CONFIG_UART_INTERRUPT_DRIVEN=n
- CONFIG_UART_ASYNC_API=n
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
extra_args: DTC_OVERLAY_FILE="boards/nrf52840dk_nrf52840.overlay;nrf_rx_disable.overlay"
platform_exclude:
- nrf54l09pdk/nrf54l09/cpuapp
@ -38,13 +36,14 @@ tests:
- nrf54l20pdk/nrf54l20/cpuapp
- nrf54l15bsim/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- nrf52_bsim
- nrf5340bsim/nrf5340/cpuapp
drivers.uart.pm.enhanced_poll:
extra_configs:
- CONFIG_UART_INTERRUPT_DRIVEN=n
- CONFIG_UART_ASYNC_API=n
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
platform_exclude:
- nrf54l09pdk/nrf54l09/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
@ -57,7 +56,6 @@ tests:
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
- CONFIG_UART_ASYNC_API=n
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
drivers.uart.pm.int_driven.enhanced_poll:
extra_configs:
@ -65,7 +63,6 @@ tests:
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
- CONFIG_UART_ASYNC_API=n
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
platform_exclude:
- nrf54l09pdk/nrf54l09/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
@ -78,7 +75,6 @@ tests:
- CONFIG_UART_ASYNC_API=y
- CONFIG_UART_0_ASYNC=y
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
drivers.uart.pm.async.enhanced_poll:
extra_configs:
@ -86,7 +82,6 @@ tests:
- CONFIG_UART_ASYNC_API=y
- CONFIG_UART_0_ASYNC=y
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
platform_exclude:
- nrf54l09pdk/nrf54l09/cpuapp
- nrf54l15dk/nrf54l15/cpuapp