Skip to content

Commit a04a451

Browse files
Adam Wojasinskicarlescufi
authored andcommitted
soc: arm: nordic_nrf: Replace deprecated nrfx API
This commit replaces API that became deprecated with the release of nrfx2.9 - see CHANGELOG in zephyrproject-rtos:hal_nordic repository Signed-off-by: Adam Wojasinski <[email protected]>
1 parent 01d85c2 commit a04a451

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

soc/arm/nordic_nrf/common/soc_secure.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#include "tfm_platform_api.h"
1313
#include "tfm_ioctl_api.h"
1414

15-
#if defined(GPIO_PIN_CNF_MCUSEL_Msk)
16-
void soc_secure_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t mcu)
15+
#if NRF_GPIO_HAS_SEL
16+
void soc_secure_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_sel_t mcu)
1717
{
1818
uint32_t result;
1919
enum tfm_platform_err_t err;
@@ -22,7 +22,7 @@ void soc_secure_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t m
2222
__ASSERT(err == TFM_PLATFORM_ERR_SUCCESS, "TFM platform error (%d)", err);
2323
__ASSERT(result == 0, "GPIO service error (%d)", result);
2424
}
25-
#endif /* defined(GPIO_PIN_CNF_MCUSEL_Msk) */
25+
#endif /* NRF_GPIO_HAS_SEL */
2626

2727
int soc_secure_mem_read(void *dst, void *src, size_t len)
2828
{

soc/arm/nordic_nrf/common/soc_secure.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <hal/nrf_ficr.h>
1010

1111
#if defined(CONFIG_TRUSTED_EXECUTION_NONSECURE)
12-
#if defined(GPIO_PIN_CNF_MCUSEL_Msk)
13-
void soc_secure_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_mcusel_t mcu);
12+
#if NRF_GPIO_HAS_SEL
13+
void soc_secure_gpio_pin_mcu_select(uint32_t pin_number, nrf_gpio_pin_sel_t mcu);
1414
#endif
1515

1616
int soc_secure_mem_read(void *dst, void *src, size_t len);
@@ -48,13 +48,13 @@ static inline int soc_secure_mem_read(void *dst, void *src, size_t len)
4848
return 0;
4949
}
5050

51-
#if defined(GPIO_PIN_CNF_MCUSEL_Msk)
51+
#if NRF_GPIO_HAS_SEL
5252
static inline void soc_secure_gpio_pin_mcu_select(uint32_t pin_number,
53-
nrf_gpio_pin_mcusel_t mcu)
53+
nrf_gpio_pin_sel_t mcu)
5454
{
55-
nrf_gpio_pin_mcu_select(pin_number, mcu);
55+
nrf_gpio_pin_control_select(pin_number, mcu);
5656
}
57-
#endif /* defined(GPIO_PIN_CNF_MCUSEL_Msk) */
57+
#endif /* NRF_GPIO_HAS_SEL */
5858

5959
#if defined(CONFIG_SOC_HFXO_CAP_INTERNAL)
6060
static inline uint32_t soc_secure_read_xosc32mtrim(void)

soc/arm/nordic_nrf/nrf53/soc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ static int nordicsemi_nrf53_init(const struct device *arg)
133133
* This is handled by the TF-M platform so we skip it when TF-M is
134134
* enabled.
135135
*/
136-
nrf_gpio_pin_mcu_select(PIN_XL1, NRF_GPIO_PIN_MCUSEL_PERIPHERAL);
137-
nrf_gpio_pin_mcu_select(PIN_XL2, NRF_GPIO_PIN_MCUSEL_PERIPHERAL);
136+
nrf_gpio_pin_control_select(PIN_XL1, NRF_GPIO_PIN_SEL_PERIPHERAL);
137+
nrf_gpio_pin_control_select(PIN_XL2, NRF_GPIO_PIN_SEL_PERIPHERAL);
138138
#endif /* !defined(CONFIG_BUILD_WITH_TFM) */
139139
#endif /* defined(CONFIG_SOC_ENABLE_LFXO) */
140140
#if defined(CONFIG_SOC_HFXO_CAP_INTERNAL)
@@ -175,7 +175,7 @@ static int nordicsemi_nrf53_init(const struct device *arg)
175175
};
176176

177177
for (int i = 0; i < ARRAY_SIZE(forwarded_psels); i++) {
178-
soc_secure_gpio_pin_mcu_select(forwarded_psels[i], NRF_GPIO_PIN_MCUSEL_NETWORK);
178+
soc_secure_gpio_pin_mcu_select(forwarded_psels[i], NRF_GPIO_PIN_SEL_NETWORK);
179179
}
180180

181181
#endif

0 commit comments

Comments
 (0)