Skip to content
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

remove idelay use and move to k_busy_wait in SOF Zephyr code #9656

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Nov 15, 2024

No description provided.

Prepare to remove idelay() use from generic code, so it can be removed
from the SOF rtos abstraction layer.

Signed-off-by: Kai Vehmanen <[email protected]>
Prepare to remove idelay() use from generic code, so it can be removed
from the SOF rtos abstraction layer.

Signed-off-by: Kai Vehmanen <[email protected]>
Prepare to remove idelay() use from generic code, so it can be removed
from the SOF rtos abstraction layer. This is Zephyr specific code,
so k_busy_wait() can be used directly.

Signed-off-by: Kai Vehmanen <[email protected]>
Implement wait_delay*() variants with k_busy_wait(). If some
target requires to customize the busy wait implementation,
this can be done with Zephyr CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT.

Remove idelay() as this is no longer used in generic SOF code.

Signed-off-by: Kai Vehmanen <[email protected]>
#include <rtos/timer.h>

/* TODO: use equivalent Zephyr */
static inline void idelay(int n)
static inline void wait_delay_us(uint64_t us)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick - having this function at the bottom of this patch, where it was before, would both make this patch smaller (probably) and easier to read and keep the grouping of all wait_delay*() functions as now. Not a show-stopper of course, only if you need to update

@lgirdwood lgirdwood merged commit eb4d0a9 into thesofproject:main Nov 18, 2024
45 of 47 checks passed
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.

4 participants