Skip to content

Commit 37ebff9

Browse files
nordic-krchmstasiaknordic
authored andcommitted
[nrf fromtree] 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]> (cherry picked from commit 70118c0)
1 parent 0006f52 commit 37ebff9

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
@@ -91,6 +91,8 @@ if (CONFIG_UART_NRFX_UARTE)
9191
if (CONFIG_UART_NRFX_UARTE_LEGACY_SHIM)
9292
zephyr_library_sources(uart_nrfx_uarte.c)
9393
else()
94+
message(DEPRECATION
95+
"Do not set CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=n as this option is deprecated.")
9496
zephyr_library_sources(uart_nrfx_uarte2.c)
9597
endif()
9698
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
@@ -22,27 +22,26 @@ tests:
2222
- CONFIG_UART_INTERRUPT_DRIVEN=n
2323
- CONFIG_UART_ASYNC_API=n
2424
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
25-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
2625

2726
drivers.uart.pm.no_rxpin:
2827
extra_configs:
2928
- CONFIG_UART_INTERRUPT_DRIVEN=n
3029
- CONFIG_UART_ASYNC_API=n
3130
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
32-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
3331
extra_args: DTC_OVERLAY_FILE="boards/nrf52840dk_nrf52840.overlay;nrf_rx_disable.overlay"
3432
platform_exclude:
3533
- nrf54l15dk/nrf54l15/cpuapp
3634
- nrf54l20pdk/nrf54l20/cpuapp
3735
- nrf54l15bsim/nrf54l15/cpuapp
3836
- nrf54h20dk/nrf54h20/cpuapp
37+
- nrf52_bsim
38+
- nrf5340bsim/nrf5340/cpuapp
3939

4040
drivers.uart.pm.enhanced_poll:
4141
extra_configs:
4242
- CONFIG_UART_INTERRUPT_DRIVEN=n
4343
- CONFIG_UART_ASYNC_API=n
4444
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
45-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
4645
platform_exclude:
4746
- nrf54l15dk/nrf54l15/cpuapp
4847
- nrf54l20pdk/nrf54l20/cpuapp
@@ -54,15 +53,13 @@ tests:
5453
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
5554
- CONFIG_UART_ASYNC_API=n
5655
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
57-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
5856

5957
drivers.uart.pm.int_driven.enhanced_poll:
6058
extra_configs:
6159
- CONFIG_UART_INTERRUPT_DRIVEN=y
6260
- CONFIG_UART_0_INTERRUPT_DRIVEN=y
6361
- CONFIG_UART_ASYNC_API=n
6462
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
65-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
6663
platform_exclude:
6764
- nrf54l15dk/nrf54l15/cpuapp
6865
- nrf54l20pdk/nrf54l20/cpuapp
@@ -74,15 +71,13 @@ tests:
7471
- CONFIG_UART_ASYNC_API=y
7572
- CONFIG_UART_0_ASYNC=y
7673
- CONFIG_UART_0_ENHANCED_POLL_OUT=n
77-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
7874

7975
drivers.uart.pm.async.enhanced_poll:
8076
extra_configs:
8177
- CONFIG_UART_INTERRUPT_DRIVEN=n
8278
- CONFIG_UART_ASYNC_API=y
8379
- CONFIG_UART_0_ASYNC=y
8480
- CONFIG_UART_0_ENHANCED_POLL_OUT=y
85-
- CONFIG_UART_NRFX_UARTE_LEGACY_SHIM=y
8681
platform_exclude:
8782
- nrf54l15dk/nrf54l15/cpuapp
8883
- nrf54l20pdk/nrf54l20/cpuapp

0 commit comments

Comments
 (0)