Skip to content

Conversation

@anangl
Copy link
Contributor

@anangl anangl commented Dec 14, 2024

drivers: clock_control_nrf2: Add missing cancelation of request

This is a follow-up to commit zephyrproject-rtos/zephyr@fe0e2db.

If nrf_clock_control_request_sync() ends up with a timeout, before returning it must cancel the request that was not fulfilled on time. Otherwise, the request may actually finish succesfully a bit later, but the caller will not be aware that the clock needs to be released (since the call resulted in an error).

dts: nrf54h20: Add clocks property in fast SPIM nodes

Fast SPIM instances in nRF54H20 (SPIM120 and SPIM121) are driven by the global HSFLL (HSFLL120). Add clocks property in these nodes to reflect this.

drivers: spi_nrfx_spim: Add clock requests for fast SPIM instances

Fast SPIM instances (SPIM120 and SPIM121) for correct operation require the highest frequency from the global HSFLL. This commit adds needed clock controller requests to the driver. When the runtime device power management is enabled, the frequency is requested as long as the SPIM is resumed, otherwise it is requested for the duration of transfers.

…f request

This is a follow-up to commit fe0e2db.

If `nrf_clock_control_request_sync()` ends up with a timeout, before
returning it must cancel the request that was not fulfilled on time.
Otherwise, the request may actually finish succesfully a bit later,
but the caller will not be aware that the clock needs to be released
(since the call resulted in an error).

Upstream PR #: 82994

Signed-off-by: Andrzej Głąbek <[email protected]>
Fast SPIM instances in nRF54H20 (SPIM120 and SPIM121) are driven by
the global HSFLL (HSFLL120). Add `clocks` property in these nodes
to reflect this.

Upstream PR #: 82994

Signed-off-by: Andrzej Głąbek <[email protected]>
…IM instances

Fast SPIM instances (SPIM120 and SPIM121) for correct operation require
the highest frequency from the global HSFLL. This commit adds needed
clock controller requests to the driver. When the runtime device power
management is enabled, the frequency is requested as long as the SPIM
is resumed, otherwise it is requested for the duration of transfers.

Upstream PR #: 82994

Signed-off-by: Andrzej Głąbek <[email protected]>
@anangl anangl force-pushed the req_hsfll_spim_ncs branch from 69fb192 to 84d25c9 Compare December 15, 2024 18:50
@anangl
Copy link
Contributor Author

anangl commented Dec 15, 2024

Rebased.

@nordicjm nordicjm merged commit 43b638f into nrfconnect:main Dec 16, 2024
16 checks passed
@anangl anangl deleted the req_hsfll_spim_ncs branch December 16, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants