/u-boot/lib/ |
H A D | date.c | 16 #define leapyear(year) ((year) % 4 == 0) 37 /* Number of leap corrections to apply up to end of last year */ 41 * This year is a leap year if it is divisible by 4 except when it is 44 * e.g. 1904 was a leap year, 1900 was not, 1996 is, and 2000 is. 49 /* We are past Feb. 29 in a leap year */ 65 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59. 70 * -year / 100 + year / 40 77 int year = tm->tm_year; local 95 mktime64(const unsigned int year, const unsigned int mon, const unsigned int day, const unsigned int hour, const unsigned int min, const unsigned int sec) argument [all...] |
H A D | rtc-lib.c | 9 * - The year field takes the actual value, not year - 1900. 25 int rtc_month_days(unsigned int month, unsigned int year) argument 27 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1); 35 * But in U-Boot January is month 1 and we do not subtract 1900 from the year. 39 unsigned int month, year, secs; local 47 year = 1970 + days / 365; 48 days -= (year - 1970) * 365 49 + LEAPS_THRU_END_OF(year - 1) 52 year [all...] |
/u-boot/lib/efi_selftest/ |
H A D | efi_selftest_rtc.c | 46 .year = 2017, 63 tm_old.year, tm_old.month, tm_old.day, 76 if (tm.year != tm_new.year ||
|
/u-boot/arch/arm/include/asm/ |
H A D | davinci_rtc.h | 22 unsigned int year; member in struct:davinci_rtc
|
/u-boot/include/ |
H A D | rtc.h | 298 * is_leap_year - Check if year is a leap year 300 * @year Year 301 * Return: 1 if leap year 303 static inline bool is_leap_year(unsigned int year) argument 305 return (!(year % 4) && (year % 100)) || !(year % 400); 349 * @year: year ( [all...] |
H A D | edid.h | 149 unsigned char year; member in struct:edid1_info
|
H A D | efi.h | 283 u16 year; member in struct:efi_time
|
/u-boot/cmd/ |
H A D | date.c | 183 int year, century; local 186 cnvrt2 (datestr+10, &year) ) { 189 tmp->tm_year = 100 * century + year; 191 int year, century; local 194 if (cnvrt2 (datestr+ 8, &year)) 196 tmp->tm_year = 100 * century + year;
|
H A D | eficonfig_sbkey.c | 272 time->year, time->month, time->day,
|
/u-boot/drivers/rtc/ |
H A D | pt7c4338.c | 69 u8 sec, min, hour, mday, wday, mon, year, ctl_stat; local 78 year = rtc_read(RTC_YR_REG_ADDR); 79 debug("Get RTC year: %02x mon: %02x mday: %02x wday: %02x " 81 year, mon, mday, wday, hour, min, sec, ctl_stat); 97 tmp->tm_year = bcd2bin(year) + 2000; 146 u8 sec, min, hour, mday, wday, mon, year, ctl_stat; local 155 year = rtc_read(dev, RTC_YR_REG_ADDR); 156 debug("Get RTC year: %02x mon: %02x mday: %02x wday: %02x\n", 157 year, mon, mday, wday); 176 tmp->tm_year = bcd2bin(year) [all...] |
H A D | pcf8563.c | 29 uchar sec, min, hour, mday, wday, mon_cent, year; local 37 year = rtc_read (0x08); 39 debug ( "Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " 41 year, mon_cent, mday, wday, 59 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 1900 : 2000); 125 uchar sec, min, hour, mday, wday, mon_cent, year; local 133 year = dm_i2c_reg_read(dev, 0x08); 135 debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x ", 136 year, mon_cent, mday, wday); 155 tmp->tm_year = bcd2bin(year) [all...] |
H A D | ds3231.c | 69 uchar sec, min, hour, mday, wday, mon_cent, year, control, status; local 79 year = rtc_read (RTC_YR_REG_ADDR); 81 debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " 83 year, mon_cent, mday, wday, hour, min, sec, control, status); 98 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 2000 : 1900); 178 uchar sec, min, hour, mday, wday, mon_cent, year, status; local 187 year = dm_i2c_reg_read(dev, RTC_YR_REG_ADDR); 203 tmp->tm_year = bcd2bin(year) + ((mon_cent & 0x80) ? 2000 : 1900);
|
H A D | ds1337.c | 76 uchar sec, min, hour, mday, wday, mon_cent, year, control, status; local 86 year = rtc_read (RTC_YR_REG_ADDR); 88 /* No century bit, assume year 2000 */ 93 debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " 95 year, mon_cent, mday, wday, hour, min, sec, control, status); 110 tmp->tm_year = bcd2bin (year) + ((mon_cent & 0x80) ? 2000 : 1900); 209 uchar sec, min, hour, mday, wday, mon_cent, year, control, status; local 219 year = rtc_read(dev, RTC_YR_REG_ADDR); 221 /* No century bit, assume year 2000 */ 226 debug("Get RTC year [all...] |
H A D | rx8025.c | 93 uchar sec, min, hour, mday, wday, mon, year, ctl2; local 107 year = rtc_read(RTC_YR_REG_ADDR); 109 DEBUGR("Get RTC year: %02x mon: %02x mday: %02x wday: %02x " 111 year, mon, mday, wday, hour, min, sec); 139 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); 174 printf("WARNING: year should be between 1970 and 2069!\n");
|
H A D | mc146818.c | 84 uchar sec, min, hour, mday, wday __attribute__((unused)),mon, year; local 96 year = mc146818_read8(RTC_YEAR); 98 printf("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x hr: %02x min: %02x sec: %02x\n", 99 year, mon, mday, wday, hour, min, sec); 111 tmp->tm_year = bcd2bin(year);
|
H A D | ds1307.c | 100 uchar sec, min, hour, mday, wday, mon, year; local 111 year = rtc_read (RTC_YR_REG_ADDR); 113 DEBUGR ("Get RTC year: %02x mon: %02x mday: %02x wday: %02x " 115 year, mon, mday, wday, hour, min, sec); 148 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); 171 printf("WARNING: year should be between 1970 and 2069!\n"); 238 printf("WARNING: year should be between 1970 and 2069!\n");
|
H A D | davinci.c | 183 unsigned long sec, min, hour, mday, wday, mon_cent, year; local 196 year = omap_rtc_readb(priv, OMAP_RTC_YEARS_REG); 199 "Get RTC year: %02lx mon/cent: %02lx mday: %02lx wday: %02lx " 201 year, mon_cent, mday, wday, 209 tm->tm_year = bcd2bin(year) + 2000;
|
/u-boot/board/compulab/common/ |
H A D | eeprom.c | 278 unsigned int year) 302 if (year % 4 == 0) { 303 if (year % 100 != 0) 305 else if (year % 400 == 0) 329 * year value, and checks the validity of the date. 359 unsigned int year = simple_strtol(tok3, &endptr, 0); local 361 printf("%s: invalid year\n", field->name); 365 if (validate_date(day, month - 1, year)) { 370 if (year >> 16) { 371 printf("%s: year overflo 277 validate_date(unsigned char day, unsigned char month, unsigned int year) argument [all...] |
/u-boot/lib/crypto/ |
H A D | x509_cert_parser.c | 540 * dates through the year 2049 as UTCTime; certificate validity dates in 552 unsigned year, mon, day, hour, min, sec, mon_len; local 561 year = DD2bin(p); 562 if (year >= 50) 563 year += 1900; 565 year += 2000; 570 year = DD2bin(p) * 100 + DD2bin(p); 571 if (year >= 1950 && year <= 2049) 586 if (year < 197 [all...] |
/u-boot/lib/efi_loader/ |
H A D | efi_runtime.c | 310 time->year = tm.tm_year; 350 time->year < 1900 || time->year > 9999 || 352 time->day > rtc_month_days(time->month - 1, time->year) || 395 tm.tm_year = time->year;
|
H A D | efi_variable.c | 93 tm.tm_year = timestamp.year;
|
H A D | efi_file.c | 493 time->year = tm->tm_year;
|
/u-boot/include/linux/ |
H A D | time.h | 47 int tm_yday; /* Days in year.[0-365] */ 118 /* compute year & day of year */ 165 time64_t mktime64(const unsigned int year, const unsigned int mon,
|
H A D | fb.h | 317 __u32 year; /* Year manufactured */ member in struct:fb_monspecs
|
/u-boot/common/ |
H A D | edid.c | 396 printf("Manufactured in week: %d year: %d\n", 397 edid_info->week, edid_info->year + 1990);
|