armv7-a/r: correct maxdelay calculating

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2023-12-26 18:24:03 +08:00 committed by Xiang Xiao
parent fd2da7f4bc
commit dabed3c7fb
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
struct arm_timer_lowerhalf_s *lower =
(struct arm_timer_lowerhalf_s *)lower_;
uint64_t maxnsec = nsec_from_count(UINT32_MAX, lower->freq);
uint64_t maxnsec = nsec_from_count(UINT64_MAX, lower->freq);
ts->tv_sec = maxnsec / NSEC_PER_SEC;
ts->tv_nsec = maxnsec % NSEC_PER_SEC;

View File

@ -150,7 +150,7 @@ static int arm_timer_maxdelay(struct oneshot_lowerhalf_s *lower_,
struct arm_timer_lowerhalf_s *lower =
(struct arm_timer_lowerhalf_s *)lower_;
uint64_t maxnsec = nsec_from_count(UINT32_MAX, lower->freq);
uint64_t maxnsec = nsec_from_count(UINT64_MAX, lower->freq);
ts->tv_sec = maxnsec / NSEC_PER_SEC;
ts->tv_nsec = maxnsec % NSEC_PER_SEC;