/openbmc/linux/drivers/rtc/ |
H A D | rtc-rtd119x.c | 85 s32 day; in rtd119x_rtc_read_time() local 94 day = readl_relaxed(data->base + RTD_RTCDATE1) & RTD_RTCDATE1_RTCDATE1_MASK; in rtd119x_rtc_read_time() 95 day |= (readl_relaxed(data->base + RTD_RTCDATE2) & RTD_RTCDATE2_RTCDATE2_MASK) << 8; in rtd119x_rtc_read_time() 109 while (day >= rtd119x_rtc_days_in_year(year)) { in rtd119x_rtc_read_time() 110 day -= rtd119x_rtc_days_in_year(year); in rtd119x_rtc_read_time() 114 tm->tm_yday = day; in rtd119x_rtc_read_time() 117 while (day >= rtc_month_days(tm->tm_mon, year)) { in rtd119x_rtc_read_time() 118 day -= rtc_month_days(tm->tm_mon, year); in rtd119x_rtc_read_time() 121 tm->tm_mday = day + 1; in rtd119x_rtc_read_time() 129 unsigned int day; in rtd119x_rtc_set_time() local [all …]
|
H A D | lib.c | 39 int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) in rtc_year_days() argument 41 return rtc_ydays[is_leap_year(year)][month] + day - 1; in rtc_year_days() 59 day_of_year, month, day; in rtc_time64_to_tm() local 113 day = ((u16) u32tmp) / 2141; in rtc_time64_to_tm() 124 day = day + 1; in rtc_time64_to_tm() 132 tm->tm_mday = (int) day; in rtc_time64_to_tm()
|
H A D | rtc-cpcap.c | 36 int day; member 57 time = tod + ((cpcap->day & DAY_MASK) * SECS_PER_DAY); in cpcap2rtc_time() 68 cpcap->day = time / SECS_PER_DAY; in rtc2cpcap_time() 101 ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); in cpcap_rtc_read_time() 106 ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); in cpcap_rtc_read_time() 142 DAY_MASK, cpcap_tm.day); in cpcap_rtc_set_time() 154 DAY_MASK, cpcap_tm.day); in cpcap_rtc_set_time() 179 ret = regmap_read(rtc->regmap, CPCAP_REG_DAYA, &cpcap_tm.day); in cpcap_rtc_read_alarm() 206 cpcap_tm.day); in cpcap_rtc_set_alarm()
|
H A D | rtc-m48t35.c | 31 u8 day; member 37 u8 day; member 100 unsigned char mon, day, hrs, min, sec; in m48t35_set_time() local 106 day = tm->tm_mday; in m48t35_set_time() 127 day = bin2bcd(day); in m48t35_set_time() 136 writeb(day, &priv->reg->date); in m48t35_set_time()
|
H A D | rtc-efi.c | 30 return rtc_year_days(eft->day, eft->month - 1, eft->year); in compute_yday() 57 eft->day = wtime->tm_mday; in convert_to_efi_time() 83 if (!eft->day || eft->day > 31) in convert_from_efi_time() 85 wtime->tm_mday = eft->day; in convert_from_efi_time() 208 eft.year, eft.month, eft.day, in efi_procfs() 225 alm.year, alm.month, alm.day, in efi_procfs()
|
/openbmc/u-boot/drivers/rtc/ |
H A D | mx27rtc.c | 21 uint32_t day, hour, min, sec; in rtc_get() local 23 day = readl(&rtc_regs->dayr); in rtc_get() 30 sec += min * 60 + hour * 3600 + day * 24 * 3600; in rtc_get() 40 uint32_t day, hour, min, sec; in rtc_set() local 44 day = sec / (24 * 3600); in rtc_set() 54 writel(day, &rtc_regs->dayr); in rtc_set()
|
H A D | date.c | 34 int day; in rtc_calc_weekday() local 53 day = 1; in rtc_calc_weekday() 55 day = 0; in rtc_calc_weekday() 58 day += last_year * 365 + leaps_to_date + month_offset[tm->tm_mon - 1] + in rtc_calc_weekday() 60 tm->tm_wday = day % 7; in rtc_calc_weekday()
|
H A D | ftrtc010.c | 18 unsigned int day; /* 0x0c */ member 54 unsigned long day; in ftrtc010_time() local 62 day = readl(&rtc->day); in ftrtc010_time() 68 return day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 + second; in ftrtc010_time()
|
/openbmc/pldm/libpldmresponder/test/ |
H A D | libpldmresponder_bios_test.cpp | 34 uint8_t day = 0; in TEST() local 38 epochToBCDTime(epochTime, seconds, minutes, hours, day, month, year); in TEST() 43 ASSERT_EQ(0x13, day); in TEST() 55 uint8_t day = 13; in TEST() local 60 timeSec = timeToEpoch(sec, min, hours, day, month, year); in TEST()
|
/openbmc/phosphor-logging/extensions/openpower-pels/ |
H A D | bcd_time.hpp | 19 uint8_t day; member 26 yearMSB(0), yearLSB(0), month(0), day(0), hour(0), minutes(0), in BCDTime() 30 BCDTime(uint8_t yearMSB, uint8_t yearLSB, uint8_t month, uint8_t day, in BCDTime() 33 yearMSB(yearMSB), yearLSB(yearLSB), month(month), day(day), hour(hour), in BCDTime()
|
H A D | bcd_time.cpp | 30 (month == right.month) && (day == right.day) && in operator ==() 53 bcd.day = toBCD(gmTime->tm_mday); in getBCDTime() 80 utcTime.tm_mday = fromBCD(bcdTime.day); in getMillisecondsSinceEpoch() 98 s >> time.yearMSB >> time.yearLSB >> time.month >> time.day >> time.hour; in operator >>() 105 s << time.yearMSB << time.yearLSB << time.month << time.day << time.hour; in operator <<()
|
/openbmc/linux/kernel/time/ |
H A D | timeconv.c | 49 u32 u32tmp, day_of_century, year_of_century, day_of_year, month, day; in time64_to_tm() local 121 day = ((u16) u32tmp) / 2141; in time64_to_tm() 132 day = day + 1; in time64_to_tm() 138 result->tm_mday = (int) day; in time64_to_tm()
|
/openbmc/linux/arch/mips/include/asm/ |
H A D | mc146818-time.h | 91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local 100 day = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_cmos_time() 109 day = bcd2bin(day); in mc146818_get_cmos_time() 116 return mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
/openbmc/linux/arch/sh/boards/mach-sh03/ |
H A D | rtc.c | 43 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 51 day = (__raw_readb(RTC_DAY1) & 0xf) + (__raw_readb(RTC_DAY10) & 0xf) * 10; in sh03_rtc_gettimeofday() 57 if (year == 0 || mon < 1 || mon > 12 || day > 31 || day < 1 || in sh03_rtc_gettimeofday() 62 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday() 82 tm->tm_mday = day; in sh03_rtc_gettimeofday()
|
/openbmc/linux/arch/m68k/atari/ |
H A D | time.c | 201 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; in atari_tt_hwclk() local 215 day = t->tm_mday; in atari_tt_hwclk() 234 day = bin2bcd(day); in atari_tt_hwclk() 267 day = RTC_READ( RTC_DAY_OF_MONTH ); in atari_tt_hwclk() 276 RTC_WRITE( RTC_DAY_OF_MONTH, day ); in atari_tt_hwclk() 296 day = bcd2bin(day); in atari_tt_hwclk() 312 t->tm_mday = day; in atari_tt_hwclk()
|
/openbmc/linux/arch/mips/dec/ |
H A D | time.c | 24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local 33 day = CMOS_READ(RTC_DAY_OF_MONTH); in read_persistent_clock64() 50 day = bcd2bin(day); in read_persistent_clock64() 57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64()
|
/openbmc/linux/arch/m68k/mvme16x/ |
H A D | rtc.c | 69 unsigned char mon, day, hrs, min, sec, leap_yr; in rtc_ioctl() local 82 day = rtc_tm.tm_mday; in rtc_ioctl() 89 if ((mon > 12) || (day == 0)) in rtc_ioctl() 92 if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr))) in rtc_ioctl() 107 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl()
|
/openbmc/libpldm/src/dsp/ |
H A D | bios.c | 27 uint8_t day, uint8_t month, uint16_t year, in encode_get_date_time_resp() argument 53 response->day = day; in encode_get_date_time_resp() 63 uint8_t *minutes, uint8_t *hours, uint8_t *day, in decode_get_date_time_resp() argument 67 hours == NULL || day == NULL || month == NULL || year == NULL || in decode_get_date_time_resp() 87 *day = response->day; in decode_get_date_time_resp() 96 uint8_t minutes, uint8_t hours, uint8_t day, in encode_set_date_time_req() argument 107 if (!is_time_legal(seconds, minutes, hours, day, month, year)) { in encode_set_date_time_req() 127 request->day = dec2bcd8(day); in encode_set_date_time_req() 137 uint8_t *day, uint8_t *month, uint16_t *year) in decode_set_date_time_req() argument 140 hours == NULL || day == NULL || month == NULL || year == NULL) { in decode_set_date_time_req() [all …]
|
/openbmc/libpldm/tests/dsp/ |
H A D | bios.cpp | 29 uint8_t day = 23; in TEST() local 40 hours, day, month, year, response); in TEST() 55 &day, sizeof(day))); in TEST() 58 sizeof(day), in TEST() 63 sizeof(day) + sizeof(month), in TEST() 76 uint8_t day = 9; in TEST() local 98 &day, sizeof(day)); in TEST() 100 sizeof(minutes) + sizeof(hours) + sizeof(day) + hdrSize, in TEST() 103 sizeof(minutes) + sizeof(hours) + sizeof(day) + sizeof(month) + in TEST() 118 EXPECT_EQ(day, retDay); in TEST() [all …]
|
/openbmc/pldm/libpldmresponder/ |
H A D | bios.cpp | 26 uint8_t& hours, uint8_t& day, uint8_t& month, in epochToBCDTime() argument 35 day = pldm::utils::decimalToBcd(time->tm_mday); in epochToBCDTime() 44 uint8_t day, uint8_t month, uint16_t year) in timeToEpoch() argument 50 stm.tm_mday = day; in timeToEpoch() 116 uint8_t day = 0; in getDateTime() local 144 day, month, year); in getDateTime() 147 seconds, minutes, hours, day, month, in getDateTime() 162 uint8_t day = 0; in setDateTime() local 198 &minutes, &hours, &day, &month, &year); in setDateTime() 203 timeSec = pldm::responder::utils::timeToEpoch(seconds, minutes, hours, day, in setDateTime()
|
/openbmc/linux/arch/powerpc/platforms/chrp/ |
H A D | time.c | 132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local 138 day = chrp_cmos_clock_read(RTC_DAY_OF_MONTH); in chrp_get_rtc_time() 147 day = bcd2bin(day); in chrp_get_rtc_time() 156 tm->tm_mday = day; in chrp_get_rtc_time()
|
/openbmc/linux/fs/isofs/ |
H A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 26 day = p[2]; in iso_date() 36 crtime = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
|
/openbmc/linux/arch/m68k/bvme6000/ |
H A D | rtc.c | 74 unsigned char mon, day, hrs, min, sec, leap_yr; in rtc_ioctl() local 87 day = rtc_tm.tm_mday; in rtc_ioctl() 94 if ((mon > 12) || (mon < 1) || (day == 0)) in rtc_ioctl() 97 if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr))) in rtc_ioctl() 116 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl()
|
/openbmc/bmcweb/redfish-core/include/utils/extern/ |
H A D | date.h | 226 class day; variable 251 CONSTCD11 month_day operator/(const day& d, const month& m) NOEXCEPT; 252 CONSTCD11 month_day operator/(const day& d, int m) NOEXCEPT; 253 CONSTCD11 month_day operator/(const month& m, const day& d) NOEXCEPT; 255 CONSTCD11 month_day operator/(int m, const day& d) NOEXCEPT; 272 CONSTCD11 year_month_day operator/(const year_month& ym, const day& d) NOEXCEPT; 334 class day 339 day() = default; 340 explicit CONSTCD11 day(unsigned d) NOEXCEPT; 342 CONSTCD14 day& operator++() NOEXCEPT; [all …]
|
/openbmc/u-boot/board/compulab/common/ |
H A D | eeprom.c | 285 static int validate_date(unsigned char day, unsigned char month, in validate_date() argument 298 if (day > 31) in validate_date() 305 if (day > 30) in validate_date() 317 if (day > days_in_february) in validate_date() 356 unsigned char day = (unsigned char)simple_strtol(tok1, &endptr, 0); in eeprom_field_update_date() local 357 if (*endptr != '\0' || day == 0) { in eeprom_field_update_date() 373 if (validate_date(day, month - 1, year)) { in eeprom_field_update_date() 383 field->buf[0] = day; in eeprom_field_update_date()
|