Skip to content

Commit 774af4c

Browse files
ananglrlubos
authored andcommitted
[nrf fromtree] drivers: spi_nrfx_spim: Fix SPIM_REQUESTS_CLOCK() and calls to it
This is a follow-up to commit a068709. As the SPIM_REQUESTS_CLOCK() macro changed the type of its parameter, all of the calls to it need to be updated accordingly. Also the call to DT_NODELABEL() needs to be removed from that macro as DT_CLOCKS_CTLR() already returns a node identifier. Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit ec06e63)
1 parent 45f042e commit 774af4c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/spi/spi_nrfx_spim.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ LOG_MODULE_REGISTER(spi_nrfx_spim, CONFIG_SPI_LOG_LEVEL);
4545

4646
#if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL)
4747
#define SPIM_REQUESTS_CLOCK(node) \
48-
DT_NODE_HAS_COMPAT(DT_NODELABEL(DT_CLOCKS_CTLR(node)), nordic_nrf_hsfll_global)
48+
DT_NODE_HAS_COMPAT(DT_CLOCKS_CTLR(node), nordic_nrf_hsfll_global)
4949
#define SPIM_REQUESTS_CLOCK_OR(node) SPIM_REQUESTS_CLOCK(node) ||
5050
#if (DT_FOREACH_STATUS_OKAY(nordic_nrf_spim, SPIM_REQUESTS_CLOCK_OR) 0)
5151
#define USE_CLOCK_REQUESTS 1
@@ -56,7 +56,7 @@ LOG_MODULE_REGISTER(spi_nrfx_spim, CONFIG_SPI_LOG_LEVEL);
5656
BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE_SYSTEM_MANAGED));
5757
#endif
5858
#else
59-
#define SPIM_REQUESTS_CLOCK(idx) 0
59+
#define SPIM_REQUESTS_CLOCK(node) 0
6060
#endif
6161

6262
struct spi_nrfx_data {
@@ -799,7 +799,7 @@ static int spi_nrfx_init(const struct device *dev)
799799
#if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL_INIT_PRIORITY) && \
800800
CONFIG_SPI_INIT_PRIORITY < CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL_INIT_PRIORITY
801801
#define SPIM_INIT_PRIORITY(idx) \
802-
COND_CODE_1(SPIM_REQUESTS_CLOCK(idx), \
802+
COND_CODE_1(SPIM_REQUESTS_CLOCK(SPIM(idx)), \
803803
(UTIL_INC(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL_INIT_PRIORITY)), \
804804
(CONFIG_SPI_INIT_PRIORITY))
805805
#else
@@ -858,8 +858,8 @@ static int spi_nrfx_init(const struct device *dev)
858858
.wake_gpiote = WAKE_GPIOTE_INSTANCE(SPIM(idx)), \
859859
IF_ENABLED(CONFIG_DCACHE, \
860860
(.mem_attr = SPIM_GET_MEM_ATTR(idx),)) \
861-
IF_ENABLED(USE_CLOCK_REQUESTS, \
862-
(.clk_dev = SPIM_REQUESTS_CLOCK(idx) \
861+
IF_ENABLED(USE_CLOCK_REQUESTS, \
862+
(.clk_dev = SPIM_REQUESTS_CLOCK(SPIM(idx)) \
863863
? DEVICE_DT_GET(DT_CLOCKS_CTLR(SPIM(idx))) \
864864
: NULL, \
865865
.clk_spec = { \

0 commit comments

Comments
 (0)