Skip to content

Commit 70118c0

Browse files
nordic-krchkartben
authored andcommitted
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 <[email protected]>
1 parent bd92494 commit 70118c0

File tree

6 files changed

+11
-22
lines changed

6 files changed

+11
-22
lines changed

drivers/serial/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ if (CONFIG_UART_NRFX_UARTE)
9393
if (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM)
9494
zephyr_library_sources(uart_nrfx_uarte.c)
9595
else()
96+
message(DEPRECATION
97+
"Do not set CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n as this option is deprecated.")
9698
zephyr_library_sources(uart_nrfx_uarte2.c)
9799
endif()
98100
endif()

drivers/serial/Kconfig.nrfx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ config UART_NRFX_UARTE_LEGACY_SHIM
3232
bool "Legacy UARTE shim"
3333
depends on UART_NRFX_UARTE
3434
default y
35+
help
36+
Disabling this option is deprecated.
3537

3638
config UART_NRFX_UARTE_ENHANCED_RX
3739
bool "Enhanced RX handling"

soc/nordic/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,9 @@ config NRF_PLATFORM_HALTIUM
197197
this option. This allows to easily enable common functionality on
198198
SoCs based on the Haltium platform.
199199

200+
config DEPRECATED_UART_NRFX_UARTE_LEGACY_SHIM
201+
bool
202+
default y if !UART_NRFX_UARTE_LEGACY_SHIM
203+
select DEPRECATED
204+
200205
endif # SOC_FAMILY_NORDIC_NRF

tests/drivers/uart/uart_async_api/testcase.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,6 @@ tests:
2525
platform_allow: nucleo_h743zi
2626
integration_platforms:
2727
- nucleo_h743zi
28-
drivers.uart.async_api.nrf_uarte_new:
29-
platform_allow:
30-
- nrf52840dk/nrf52840
31-
- nrf52_bsim
32-
- nrf5340bsim/nrf5340/cpuapp
33-
- nrf54l20pdk/nrf54l20/cpuapp
34-
- nrf54l15bsim/nrf54l15/cpuapp
35-
filter: CONFIG_SERIAL_SUPPORT_ASYNC
36-
harness: ztest
37-
harness_config:
38-
fixture: gpio_loopback
39-
depends_on: gpio
40-
extra_configs:
41-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n
4228
drivers.uart.async_api.nrf_uart:
4329
filter: CONFIG_SERIAL_SUPPORT_ASYNC
4430
harness: ztest

tests/drivers/uart/uart_elementary/boards/nrf5340dk_nrf5340_cpuapp.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/drivers/uart/uart_pm/testcase.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,27 @@ tests:
2323
- CONFIG_UART_INTERRUPT_DRIVEN=n
2424
- CONFIG_UART_ASYNC_API=n
2525
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
26-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
2726

2827
drivers.uart.pm.no_rxpin:
2928
extra_configs:
3029
- CONFIG_UART_INTERRUPT_DRIVEN=n
3130
- CONFIG_UART_ASYNC_API=n
3231
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
33-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
3432
extra_args: DTC_OVERLAY_FILE="boards/nrf52840dk_nrf52840.overlay;nrf_rx_disable.overlay"
3533
platform_exclude:
3634
- nrf54l09pdk/nrf54l09/cpuapp
3735
- nrf54l15dk/nrf54l15/cpuapp
3836
- nrf54l20pdk/nrf54l20/cpuapp
3937
- nrf54l15bsim/nrf54l15/cpuapp
4038
- nrf54h20dk/nrf54h20/cpuapp
39+
- nrf52_bsim
40+
- nrf5340bsim/nrf5340/cpuapp
4141

4242
drivers.uart.pm.enhanced_poll:
4343
extra_configs:
4444
- CONFIG_UART_INTERRUPT_DRIVEN=n
4545
- CONFIG_UART_ASYNC_API=n
4646
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
47-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
4847
platform_exclude:
4948
- nrf54l09pdk/nrf54l09/cpuapp
5049
- nrf54l15dk/nrf54l15/cpuapp
@@ -57,15 +56,13 @@ tests:
5756
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
5857
- CONFIG_UART_ASYNC_API=n
5958
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
60-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
6159

6260
drivers.uart.pm.int_driven.enhanced_poll:
6361
extra_configs:
6462
- CONFIG_UART_INTERRUPT_DRIVEN=y
6563
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
6664
- CONFIG_UART_ASYNC_API=n
6765
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
68-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
6966
platform_exclude:
7067
- nrf54l09pdk/nrf54l09/cpuapp
7168
- nrf54l15dk/nrf54l15/cpuapp
@@ -78,15 +75,13 @@ tests:
7875
- CONFIG_UART_ASYNC_API=y
7976
- CONFIG_UART_0_ASYNC=y
8077
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
81-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
8278

8379
drivers.uart.pm.async.enhanced_poll:
8480
extra_configs:
8581
- CONFIG_UART_INTERRUPT_DRIVEN=n
8682
- CONFIG_UART_ASYNC_API=y
8783
- CONFIG_UART_0_ASYNC=y
8884
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
89-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
9085
platform_exclude:
9186
- nrf54l09pdk/nrf54l09/cpuapp
9287
- nrf54l15dk/nrf54l15/cpuapp

0 commit comments

Comments
 (0)