Skip to content

Commit

Permalink
[Review] drivers: stm32_rtc: introduce STM32 RTC driver
Browse files Browse the repository at this point in the history
Explicit stm32_rtc_diff_time_ms() expects current is more recent than
ref.

Signed-off-by: Gatien Chevallier <[email protected]>
  • Loading branch information
GseoC committed Jan 2, 2025
1 parent d55acb2 commit dcb9548
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/drivers/stm32_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ static void stm32_rtc_fill_time(struct optee_rtc_time *tm)
((dr & RTC_DR_YU_MASK) >> RTC_DR_YU_SHIFT) + 2000;
}

/* Return difference in milliseconds on seconds-in-day fraction */
/*
* Here, we assume that ref is prior to current
*
* Return difference in milliseconds on seconds-in-day fraction
*/
static unsigned long long stm32_rtc_diff_time_ms(struct optee_rtc_time *current,
struct optee_rtc_time *ref)
{
Expand Down

0 comments on commit dcb9548

Please sign in to comment.