-
Notifications
You must be signed in to change notification settings - Fork 9
[ot] hw/opentitan: ot_aon_timer: Make wakeup timer 64 bits #109
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
[ot] hw/opentitan: ot_aon_timer: Make wakeup timer 64 bits #109
Conversation
e0bca2c
to
10d4825
Compare
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.
LGTM, except the file header (lowRISC, 2025 ... 😄)
Adding @loiclefort who better knowns the timer implementation than I do.
10d4825
to
609a103
Compare
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 would add some explicit casts as there are several signed / unsigned implicit conversions, some of which already existed in the original implementation, sorry about that.
609a103
to
434372a
Compare
For earlgrey-1.0.0, OpenTitan's aon_timer has been updated so that it's wakeup timer is now a 64-bit counter rather than a 32-bit counter (whereas the watchdog timer remains 32-bit). This requires the implementation of register mapping changes with each wakeup count / threshold register now having a HI/LO counterpart. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
434372a
to
ef6cf9e
Compare
I believe I've addressed the implicit signed/unsigned casts now, but please do double check |
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.
LGTM. Thanks
For
earlgrey-1.0.0
, OpenTitan's aon_timer has been updated so that it's wakeup timer is now a 64-bit counter rather than a 32-bit counter (whereas the watchdog timer remains 32-bit). This PR makes the necessary implementation changes to add this functionality, including fixes to the values of shifted registers.This changes has been tested to make the following tests (which were previously failing) pass:
aon_timer_irq_test
, andpwrmgr_wdog_test
(running with an icount shift oficount=7
). All tests were built from master on OpenTitan.