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

xtensa: add xtensa arch oneshot ops #5877

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

zhuyanlinzyl
Copy link
Contributor

@zhuyanlinzyl zhuyanlinzyl commented Mar 28, 2022

As xtensa timer is common in all xtensa chips,
Use oneshot ops, implement a common xtensa oneshot timer.

Summary

Impact

Testing

Copy link
Contributor

@pkarashchenko pkarashchenko left a comment

Choose a reason for hiding this comment

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

In general LGTM.
Few optional style issues.

arch/xtensa/src/common/xtensa_oneshot.c Outdated Show resolved Hide resolved
arch/xtensa/src/common/xtensa_oneshot.c Outdated Show resolved Hide resolved
arch/xtensa/src/common/xtensa_oneshot.c Outdated Show resolved Hide resolved
@Ouss4
Copy link
Member

Ouss4 commented Mar 28, 2022

What timer are you using with this? Timer0 is already used for the tick. Timer1 and Timer2 have priority 3 and 5 respectively, is this the same for your configuration?

@zhuyanlinzyl
Copy link
Contributor Author

hi @Ouss4 , We used timer2 with this, the interrupt priority is 2. And we used it as cpuload timer.

  lower = xtensa_oneshot_initialize(XTENSA_IRQ_TIMER2,
                                    CONFIG_HIFI4_CLOCK_FREQUENCY);
  nxsched_oneshot_extclk(lower);

we use Aon timer as system tick

As xtensa timer is common in all xtensa chips,
Use oneshot ops, implement a common xtensa oneshot timer.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
@Ouss4
Copy link
Member

Ouss4 commented Mar 28, 2022

hi @Ouss4 , We used timer2 with this, the interrupt priority is 2. And we used it as cpuload timer.

lower = xtensa_oneshot_initialize(XTENSA_IRQ_TIMER2,
CONFIG_HIFI4_CLOCK_FREQUENCY);
nxsched_oneshot_extclk(lower);
we use Aon timer as system tick

Alright, thanks for the explanation.

@xiaoxiang781216 xiaoxiang781216 merged commit d7391bf into apache:master Mar 28, 2022
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