-
Notifications
You must be signed in to change notification settings - Fork 8.4k
soc: nordic: common: Add MRAM latency manager #81381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
soc/nordic/common/mram_latency.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is only application expected to call this API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've split the init into 2 stages, first onoff manager is initialized and then nrfs. Requests that comes before nrfs is initialized will not get completion notification until nrfs is initialized.
soc/nordic/common/mram_latency.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd try to be consistent with gpd: use some namespacing, place it under soc/nrf54h/..., headers nrf/mram_latency.h, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not put it in nrf54h because of nrf92 and took the similar approach to dmm. I can move it to nrf54h however i see that it is already a bit unclear with regards to include files (only gdp has it's own include path). Maybe we should have soc/nordic/include/nrf path?
soc/nordic/common/mram_latency.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an additional sync API may be useful for simplicity, dealing with onoff is cumbersome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added mram_no_latency_sync_request() and mram_no_latency_sync_release()
soc/nordic/common/mram_latency.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is goto needed if no cleanup action is done>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was initially logging rv so wanted to have one place. Removed label and gotos now.
d3be0ac to
4b886b1
Compare
Add module for managing multiple requests for MRAM latency. Signed-off-by: Krzysztof Chruściński <[email protected]>
Add test for MRAM latency. Signed-off-by: Krzysztof Chruściński <[email protected]>
kl-cruz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you open related PR in sdk-zephyr?
|
@masz-nordic @anangl can you take a look? |
| /** @internal For test purposes only. */ | ||
| extern struct onoff_manager mram_latency_mgr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's only for tests then why not place it in tests/boards/nrf/mram_latency/src/main.c?
Add module for managing multiple requests for setting MRAM operations without the latency. Module is using onoff manager.