drivers: spi: nrfx_spim: use clock phandle for HSFLL nodes
Instead of explicitly defining the SPIM instances that need it. Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
This commit is contained in:
parent
cc837284fd
commit
a068709171
1 changed files with 6 additions and 5 deletions
|
@ -43,17 +43,18 @@ LOG_MODULE_REGISTER(spi_nrfx_spim, CONFIG_SPI_LOG_LEVEL);
|
||||||
#define SPI_BUFFER_IN_RAM 1
|
#define SPI_BUFFER_IN_RAM 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL) && \
|
#if defined(CONFIG_CLOCK_CONTROL_NRF2_GLOBAL_HSFLL)
|
||||||
(defined(CONFIG_HAS_HW_NRF_SPIM120) || \
|
#define SPIM_REQUESTS_CLOCK(node) \
|
||||||
defined(CONFIG_HAS_HW_NRF_SPIM121))
|
DT_NODE_HAS_COMPAT(DT_NODELABEL(DT_CLOCKS_CTLR(node)), nordic_nrf_hsfll_global)
|
||||||
#define SPIM_REQUESTS_CLOCK(idx) UTIL_OR(IS_EQ(idx, 120), \
|
#define SPIM_REQUESTS_CLOCK_OR(node) SPIM_REQUESTS_CLOCK(node) ||
|
||||||
IS_EQ(idx, 121))
|
#if (DT_FOREACH_STATUS_OKAY(nordic_nrf_spim, SPIM_REQUESTS_CLOCK_OR) 0)
|
||||||
#define USE_CLOCK_REQUESTS 1
|
#define USE_CLOCK_REQUESTS 1
|
||||||
/* If fast instances are used then system managed device PM cannot be used because
|
/* If fast instances are used then system managed device PM cannot be used because
|
||||||
* it may call PM actions from locked context and fast SPIM PM actions can only be
|
* it may call PM actions from locked context and fast SPIM PM actions can only be
|
||||||
* called from a thread context.
|
* called from a thread context.
|
||||||
*/
|
*/
|
||||||
BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE_SYSTEM_MANAGED));
|
BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE_SYSTEM_MANAGED));
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define SPIM_REQUESTS_CLOCK(idx) 0
|
#define SPIM_REQUESTS_CLOCK(idx) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue