Skip to content

Commit 9d5a624

Browse files
committed
[nrf fromlist] soc: nordic: common: mram_latency: Add option to auto request no latency
Add CONFIG_MRAM_LATENCY_AUTO_REQ. When option is enabled then module requests no latency during the initialization. This option might be useful for cases where we want to achieve maximum performance and want to avoid controlling MRAM in the code. Upstream PR #: 82465 Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent cfd6cdb commit 9d5a624

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

soc/nordic/common/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ config MRAM_LATENCY_SYNC_TIMEOUT
2525
help
2626
Timeout is given in milliseconds.
2727

28+
config MRAM_LATENCY_AUTO_REQ
29+
bool "Request MRAM without latency at start"
30+
help
31+
When enabled then MRAM configuration without latency is requested
32+
during the initialization and is kept enabled until the mram_latency API user
33+
calls mram_no_latency_sync_release().
34+
2835
module = MRAM_LATENCY
2936
module-str = mram_latency
3037
source "subsys/logging/Kconfig.template.log_config"

soc/nordic/common/mram_latency.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ static int init_nrfs(void)
168168

169169
state = MRAM_LATENCY_ON;
170170

171+
if (IS_ENABLED(CONFIG_MRAM_LATENCY_AUTO_REQ)) {
172+
mram_no_latency_sync_request();
173+
}
174+
171175
return rv;
172176
}
173177

0 commit comments

Comments
 (0)