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

Implement tickless capability for xlnx_psttc_timer #19869

Closed
Tracked by #20594
stephanosio opened this issue Oct 16, 2019 · 4 comments · Fixed by #23567
Closed
Tracked by #20594

Implement tickless capability for xlnx_psttc_timer #19869

stephanosio opened this issue Oct 16, 2019 · 4 comments · Fixed by #23567
Assignees
Labels
area: Drivers area: Timer Timer Enhancement Changes/Updates/Additions to existing features platform: Xilinx Xilinx
Milestone

Comments

@stephanosio
Copy link
Member

The xlnx_psttc_timer (drivers/timer/xlnx_psttc_timer.c) system timer driver only implements tickful timer API at this time.

Since tickless timer API is required for most tests to function properly, this feature should be implemented in order to expand the range of tests that can run on qemu_cortex_r5.

At the same time, fix any bugs and/or non-standard behaviours that cause test failures in this timer driver.

@stephanosio stephanosio added Enhancement Changes/Updates/Additions to existing features area: Drivers area: Timer Timer labels Oct 16, 2019
@stephanosio stephanosio self-assigned this Oct 28, 2019
@stephanosio stephanosio added this to the v2.2.0 milestone Dec 19, 2019
@stephanosio
Copy link
Member Author

@wjliang According to the Zynq UltraScale+ TRM, the TTC implements 32-bit counters; while both the Cadence TTC IP datasheet (I-IPA01-0028-USR Rev 06) and the current xlnx_psttc_timer.c implementation suggest that the TTC counter is only 16-bit wide.

Could you advise on which is correct?

@stephanosio
Copy link
Member Author

For future reference, found the answer on the Xilinx Wiki
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841648/TTC+Standalone+Driver

Modified XTtcPs_GetCounterValue,XTtcPs_GetInterval and XTtcPs_CalcIntervalFromFreq functions to use 32 bit counter/interval values for Zynq Ultrascale+ MPSoC

Fixed bug in XTtcPs_CalcIntervalFromFreq API to use correct maximum interval count (32 bit) for ZynqMP.

Three independent 32-bit timer/counters for ZynqMP and 16-bit timer/counter for Zynq

@stephanosio
Copy link
Member Author

The timing of the Xilinx QEMU PS TTC emulation was found to be simply too unstable to support tickless mode operation.

Since the primary motive of this issue was to support CI validation of the tests that require tickless mode and this is not possible due to the inherent limitations in the Xilinx QEMU, this issue is going to be indefinitely postponed.

@stephanosio stephanosio removed this from the v2.2.0 milestone Dec 23, 2019
@stephanosio stephanosio added the Wont Fix Not going to fix or implement label Feb 10, 2020
@stephanosio stephanosio reopened this Mar 18, 2020
@stephanosio stephanosio removed the Wont Fix Not going to fix or implement label Mar 18, 2020
@stephanosio
Copy link
Member Author

Re-opening since the QEMU icount mode allows stable emulation of the TTC timer "match" mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Drivers area: Timer Timer Enhancement Changes/Updates/Additions to existing features platform: Xilinx Xilinx
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant