-
Notifications
You must be signed in to change notification settings - Fork 8.2k
adsp: ace: ipc: boot: power: watchdog: A set of changes required by the watchdog #53840
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -166,6 +166,37 @@ bool intel_adsp_ipc_send_message_sync(const struct device *dev, | |
| return ret; | ||
| } | ||
|
|
||
| void intel_adsp_ipc_send_message_emergency(const struct device *dev, uint32_t data, | ||
| uint32_t ext_data) | ||
| { | ||
| const struct intel_adsp_ipc_config * const config = dev->config; | ||
|
|
||
| volatile struct intel_adsp_ipc * const regs = config->regs; | ||
| bool done; | ||
|
|
||
| /* check if host is processing message. */ | ||
| while (regs->idr & INTEL_ADSP_IPC_BUSY) { | ||
| k_busy_wait(1); | ||
| } | ||
|
|
||
| /* check if host has pending acknowledge msg | ||
| * Same signal, but on different bits in 1.5 | ||
| */ | ||
| done = IS_ENABLED(CONFIG_SOC_INTEL_CAVS_V15) ? (regs->idd & INTEL_ADSP_IPC_DONE) | ||
| : (regs->ida & INTEL_ADSP_IPC_DONE); | ||
| if (done) { | ||
| /* IPC completion */ | ||
| if (IS_ENABLED(CONFIG_SOC_INTEL_CAVS_V15)) { | ||
| regs->idd = INTEL_ADSP_IPC_DONE; | ||
| } else { | ||
| regs->ida = INTEL_ADSP_IPC_DONE; | ||
| } | ||
| } | ||
|
|
||
| regs->idd = ext_data; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it right ? this is overwriting the value set few lines above for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. I made it identical to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it looks like by analogy it should work, I'll look into CAVS15 registers asap. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, so we have it partially wrong. We can of course assume that application logic (that provides extended message value) had prepared the message in the way that is suitable. Let's say application copied state of IDD 31 and 30 bit to the extended message and then wrote remaining 29 bits content. But this is not a good practice in my opinion. It works for now so I guess we can merge this PR and provide some fixes in separate PR that would also fix the body of intel_adsp_ipc_send_message function. |
||
| regs->idr = data | INTEL_ADSP_IPC_BUSY; | ||
| } | ||
|
|
||
| #if DT_NODE_EXISTS(INTEL_ADSP_IPC_HOST_DTNODE) | ||
|
|
||
| #if defined(CONFIG_SOC_SERIES_INTEL_ACE) | ||
|
|
||
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.
WAIT_FOR
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.
This is an emergency function used to send a notification about watchdog timeout on a primary core. We don't want any timeout here.