Searched refs:tm (Results 1 – 10 of 10) sorted by relevance
| /optee_os/core/drivers/ |
| H A D | atmel_rtc.c | 109 struct optee_rtc_time *tm) in atmel_decode_date() argument 121 tm->tm_wday = bcd_decode(RTC_VAL(CAL_DAY, date)) - 1; in atmel_decode_date() 122 tm->tm_mday = bcd_decode(RTC_VAL(CAL_DATE, date)); in atmel_decode_date() 123 tm->tm_mon = bcd_decode(RTC_VAL(CAL_MONTH, date)) - 1; in atmel_decode_date() 124 tm->tm_year = bcd_decode(RTC_VAL(CAL_CENT, date)) * 100; in atmel_decode_date() 125 tm->tm_year += bcd_decode(RTC_VAL(CAL_YEAR, date)); in atmel_decode_date() 127 tm->tm_hour = bcd_decode(RTC_VAL(TIME_HOUR, time)); in atmel_decode_date() 128 tm->tm_min = bcd_decode(RTC_VAL(TIME_MIN, time)); in atmel_decode_date() 129 tm->tm_sec = bcd_decode(RTC_VAL(TIME_SEC, time)); in atmel_decode_date() 133 struct optee_rtc_time *tm) in atmel_rtc_get_time() argument [all …]
|
| H A D | stm32_rtc.c | 541 struct optee_rtc_time *tm) in stm32_rtc_to_tm() argument 543 tm->tm_hour = ((tr & RTC_TR_HT_MASK) >> RTC_TR_HT_SHIFT) * 10 + in stm32_rtc_to_tm() 547 tm->tm_hour += 12; in stm32_rtc_to_tm() 549 tm->tm_ms = (stm32_rtc_get_subsecond(ssr) * MS_PER_SEC) / in stm32_rtc_to_tm() 552 tm->tm_sec = ((tr & RTC_TR_ST_MASK) >> RTC_TR_ST_SHIFT) * 10 + in stm32_rtc_to_tm() 555 tm->tm_min = ((tr & RTC_TR_MNT_MASK) >> RTC_TR_MNT_SHIFT) * 10 + in stm32_rtc_to_tm() 558 tm->tm_wday = ((dr & RTC_DR_WDU_MASK) >> RTC_DR_WDU_SHIFT) % 7; in stm32_rtc_to_tm() 560 tm->tm_mday = ((dr & RTC_DR_DT_MASK) >> RTC_DR_DT_SHIFT) * 10 + in stm32_rtc_to_tm() 563 tm->tm_mon = ((dr & RTC_DR_MT_MASK) >> RTC_DR_MT_SHIFT) * 10 + in stm32_rtc_to_tm() 566 tm->tm_year = ((dr & RTC_DR_YT_MASK) >> RTC_DR_YT_SHIFT) * 10 + in stm32_rtc_to_tm() [all …]
|
| H A D | atmel_piobu.c | 257 struct optee_rtc_time tm = { }; in secumod_it_handler() local 272 res = atmel_rtc_get_tamper_timestamp(&tm); in secumod_it_handler() 275 tm.tm_mday, tm.tm_mon, tm.tm_year); in secumod_it_handler() 277 tm.tm_hour, tm.tm_min, tm.tm_sec); in secumod_it_handler()
|
| /optee_os/core/include/drivers/ |
| H A D | rtc.h | 106 TEE_Result (*get_time)(struct rtc *rtc, struct optee_rtc_time *tm); 107 TEE_Result (*set_time)(struct rtc *rtc, struct optee_rtc_time *tm); 199 static inline TEE_Result rtc_get_time(struct optee_rtc_time *tm) in rtc_get_time() argument 204 return rtc_device->ops->get_time(rtc_device, tm); in rtc_get_time() 207 static inline TEE_Result rtc_set_time(struct optee_rtc_time *tm) in rtc_set_time() argument 212 if (tm->tm_mon >= 12 || in rtc_set_time() 213 tm->tm_mday > rtc_get_month_days(tm->tm_mon, tm->tm_year) || in rtc_set_time() 214 tm->tm_wday >= 7 || tm->tm_hour >= 24 || tm->tm_min >= 60 || in rtc_set_time() 215 tm->tm_sec >= 60 || tm->tm_ms >= 1000 || in rtc_set_time() 216 rtc_timecmp(tm, &rtc_device->range_min) < 0 || in rtc_set_time() [all …]
|
| H A D | atmel_rtc.h | 13 TEE_Result atmel_rtc_get_tamper_timestamp(struct optee_rtc_time *tm); 16 TEE_Result atmel_rtc_get_tamper_timestamp(struct optee_rtc_time *tm __unused) in atmel_rtc_get_tamper_timestamp()
|
| H A D | stm32_rtc.h | 33 TEE_Result stm32_rtc_get_timestamp(struct optee_rtc_time *tm); 54 stm32_rtc_get_timestamp(struct optee_rtc_time *tm __unused) in stm32_rtc_get_timestamp()
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | tee_time_rdtime.c | 39 uint64_t tm = read_time(); in tee_time_get_sys_time() local 42 time->seconds = tm / rate; in tee_time_get_sys_time() 43 time->millis = (tm % rate) / (rate / TEE_TIME_MILLIS_BASE); in tee_time_get_sys_time()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | platform_util.c | 176 struct tm *mbedtls_platform_gmtime_r(const mbedtls_time_t *tt, in mbedtls_platform_gmtime_r() 177 struct tm *tm_buf) in mbedtls_platform_gmtime_r() 189 struct tm *lt; in mbedtls_platform_gmtime_r() 200 memcpy(tm_buf, lt, sizeof(struct tm)); in mbedtls_platform_gmtime_r()
|
| H A D | x509.c | 610 static int x509_parse_time(const unsigned char *p, mbedtls_x509_time *tm, in x509_parse_time() argument 618 tm->year = x509_parse2_int(p); in x509_parse_time() 619 if (tm->year < 0) { in x509_parse_time() 624 x = tm->year * 100; in x509_parse_time() 626 tm->year = x509_parse2_int(p); in x509_parse_time() 627 if (tm->year < 0) { in x509_parse_time() 631 x = (tm->year < 50) ? 2000 : 1900; in x509_parse_time() 633 tm->year += x; in x509_parse_time() 635 tm->mon = x509_parse2_int(p + 2); in x509_parse_time() 636 tm->day = x509_parse2_int(p + 4); in x509_parse_time() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | platform_util.h | 239 struct tm *mbedtls_platform_gmtime_r(const mbedtls_time_t *tt, 240 struct tm *tm_buf);
|