Skip to content

Commit e8a5ecc

Browse files
nordic-krchfabiobaltieri
authored andcommitted
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. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent c8d50e4 commit e8a5ecc

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
@@ -22,6 +22,13 @@ config MRAM_LATENCY_SYNC_TIMEOUT
2222
help
2323
Timeout is given in milliseconds.
2424

25+
config MRAM_LATENCY_AUTO_REQ
26+
bool "Request MRAM without latency at start"
27+
help
28+
When enabled then MRAM configuration without latency is requested
29+
during the initialization and is kept enabled until the mram_latency API user
30+
calls mram_no_latency_sync_release().
31+
2532
module = MRAM_LATENCY
2633
module-str = mram_latency
2734
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)