File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,18 @@ LOG_MODULE_REGISTER(spi_nrfx_spim, CONFIG_SPI_LOG_LEVEL);
43
43
#define SPI_BUFFER_IN_RAM 1
44
44
#endif
45
45
46
- #if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL ) && \
47
- (defined( CONFIG_HAS_HW_NRF_SPIM120 ) || \
48
- defined( CONFIG_HAS_HW_NRF_SPIM121 ) )
49
- #define SPIM_REQUESTS_CLOCK ( idx ) UTIL_OR(IS_EQ(idx, 120), \
50
- IS_EQ(idx, 121) )
46
+ #if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL )
47
+ #define SPIM_REQUESTS_CLOCK ( node ) \
48
+ DT_NODE_HAS_COMPAT(DT_NODELABEL(DT_CLOCKS_CTLR(node)), nordic_nrf_hsfll_global )
49
+ #define SPIM_REQUESTS_CLOCK_OR ( node ) SPIM_REQUESTS_CLOCK(node) ||
50
+ #if ( DT_FOREACH_STATUS_OKAY ( nordic_nrf_spim , SPIM_REQUESTS_CLOCK_OR ) 0 )
51
51
#define USE_CLOCK_REQUESTS 1
52
52
/* If fast instances are used then system managed device PM cannot be used because
53
53
* it may call PM actions from locked context and fast SPIM PM actions can only be
54
54
* called from a thread context.
55
55
*/
56
56
BUILD_ASSERT (!IS_ENABLED (CONFIG_PM_DEVICE_SYSTEM_MANAGED ));
57
+ #endif
57
58
#else
58
59
#define SPIM_REQUESTS_CLOCK (idx ) 0
59
60
#endif
You can’t perform that action at this time.
0 commit comments