/u-boot/drivers/rtc/ |
H A D | mc13xxx-rtc.c | 14 u32 day1, day2, time; local 26 ret = pmic_reg_read(p, REG_RTC_TIME, &time); 36 tim = day1 * 86400 + time; 48 u32 time, day; local 53 time = rtc_mktime(rtc); 54 day = time / 86400; 55 time %= 86400; 58 pmic_reg_write(p, REG_RTC_TIME, time);
|
H A D | sandbox_rtc.c | 16 static int sandbox_rtc_get(struct udevice *dev, struct rtc_time *time) argument 25 time->tm_sec = buf[REG_SEC - REG_SEC]; 26 time->tm_min = buf[REG_MIN - REG_SEC]; 27 time->tm_hour = buf[REG_HOUR - REG_SEC]; 28 time->tm_mday = buf[REG_MDAY - REG_SEC]; 29 time->tm_mon = buf[REG_MON - REG_SEC]; 30 time->tm_year = buf[REG_YEAR - REG_SEC] + 1900; 31 time->tm_wday = buf[REG_WDAY - REG_SEC]; 36 static int sandbox_rtc_set(struct udevice *dev, const struct rtc_time *time) argument 41 buf[REG_SEC - REG_SEC] = time [all...] |
H A D | mvrtc.c | 24 u32 time; local 27 /* read the time register */ 28 time = readl(®s->time); 34 if (time & MVRTC_HRFMT_MSK) { 39 /* time */ 40 t->tm_sec = bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK); 41 t->tm_min = bcd2bin((time >> MVRTC_MIN_SFT) & MVRTC_MIN_MSK); 42 t->tm_hour = bcd2bin((time >> MVRTC_HOUR_SFT) & MVRTC_HOUR_MSK); 43 t->tm_wday = bcd2bin((time >> MVRTC_DAY_SF 71 u32 time = 0; /* sets hour format bit to zero, 24hr format. */ local 110 u32 time; local [all...] |
H A D | emul_rtc.c | 5 * This driver emulates a real time clock based on timer ticks. 24 * @isdst: daylight saving time 29 static int emul_rtc_get(struct udevice *dev, struct rtc_time *time) argument 36 rtc_to_tm(now, time); 37 time->tm_isdst = priv->isdst; 42 static int emul_rtc_set(struct udevice *dev, const struct rtc_time *time) argument 46 if (time->tm_year < 1970) 49 priv->offset_us = rtc_mktime(time) * 1000000ULL - timer_get_us(); 51 if (time->tm_isdst > 0) 53 else if (time [all...] |
H A D | mxsrtc.c | 17 /* Set time in seconds since 1970-01-01 */ 39 int rtc_get(struct rtc_time *time) argument 45 rtc_to_tm(secs, time); 50 int rtc_set(struct rtc_time *time) argument 54 secs = rtc_mktime(time); 64 /* Set time to 1970-01-01 */
|
H A D | goldfish_rtc.c | 5 * This driver emulates a real time clock based on timer ticks. 23 * @isdst: daylight saving time 32 static int goldfish_rtc_get(struct udevice *dev, struct rtc_time *time) argument 46 rtc_to_tm(now, time); 47 time->tm_isdst = priv->isdst; 52 static int goldfish_rtc_set(struct udevice *dev, const struct rtc_time *time) argument 58 if (time->tm_year < 1970) 61 now = rtc_mktime(time) * 1000000000ULL; 65 if (time->tm_isdst > 0) 67 else if (time [all...] |
H A D | i2c_rtc_emul.c | 3 * Simulate an I2C real time clock 10 * This is a test driver. It starts off with the current time of the machine, 11 * but also supports setting the time, using an offset from the current 13 * time-keeping. It does not change the system time. 69 static int sandbox_i2c_rtc_get(struct udevice *dev, struct rtc_time *time) argument 82 rtc_to_tm(now + plat->offset, time); 87 static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time) argument 99 plat->offset = rtc_mktime(time) - now; 105 /* Update the current time i 109 struct rtc_time time; local 130 struct rtc_time time; local [all...] |
H A D | mvrtc.h | 19 u32 time; member in struct:mvrtc_registers 28 /* time register */
|
H A D | armada38x.c | 104 u32 time; local 106 time = armada38x_rtc_read(rtc, RTC_TIME); 108 rtc_to_tm(time, tm); 133 unsigned long time; local 135 time = rtc_mktime(tm); 137 if (time > U32_MAX) 138 printf("%s: requested time to set will overflow\n", dev->name); 141 armada38x_rtc_write(time, rtc, RTC_TIME);
|
H A D | ds1374.c | 80 * Get the current time from the RTC 90 * Since the reads are being performed one byte at a time, 112 printf("can't get consistent time from rtc chip\n"); 137 unsigned long time; local 147 time = rtc_mktime(tmp); 149 DEBUGR ("Set RTC s since 1.1.1970: %ld (0x%02lx)\n", time, time); 153 rtc_write_raw(RtcTodAddr[i], (unsigned char)(time & 0xff)); 154 time = time >> [all...] |
/u-boot/arch/mips/cpu/ |
H A D | time.c | 7 #include <time.h>
|
/u-boot/lib/ |
H A D | date.c | 10 #include <linux/time.h> 99 struct rtc_time time; local 101 time.tm_year = year; 102 time.tm_mon = mon; 103 time.tm_mday = day; 104 time.tm_hour = hour; 105 time.tm_min = min; 106 time.tm_sec = sec; 108 return rtc_mktime((const struct rtc_time *)&time);
|
/u-boot/test/dm/ |
H A D | rtc.c | 33 static void show_time(const char *msg, struct rtc_time *time) argument 36 time->tm_mday, time->tm_mon, time->tm_year, 37 time->tm_hour, time->tm_min, time->tm_sec); 40 static int cmp_times(struct rtc_time *expect, struct rtc_time *time, bool show) argument 44 same = expect->tm_sec == time->tm_sec; 45 same &= expect->tm_min == time 61 struct rtc_time now, time, cmp; local 150 struct rtc_time time; local [all...] |
/u-boot/tools/ |
H A D | gen_eth_addr.c | 10 #include <time.h> 17 srand(time(0) + (getpid() << 8));
|
H A D | dumpimage.h | 18 #include <time.h>
|
/u-boot/include/ |
H A D | rtc.h | 27 * get() - get the current time 29 * Returns the current time read from the RTC device. The driver 33 * @time: Place to put the time that is read 35 int (*get)(struct udevice *dev, struct rtc_time *time); 38 * set() - set the current time 40 * Sets the time in the RTC device. The driver can expect every 44 * @time: Time to write 46 int (*set)(struct udevice *dev, const struct rtc_time *time); 51 * This function resets the RTC to a known-good state. The time ma 225 dm_rtc_get(struct udevice *dev, struct rtc_time *time) argument 230 dm_rtc_set(struct udevice *dev, struct rtc_time *time) argument [all...] |
H A D | common.h | 18 #include <time.h>
|
/u-boot/test/py/tests/ |
H A D | test_sleep.py | 5 import time namespace 11 # Setup env__sleep_accurate to False if time is not accurate on your platform 14 # Setup env__sleep_time time in seconds board is set to sleep 24 the correct amount of time.""" 36 tstart = time.time() 38 tend = time.time() 47 """Test the time command, and validate that it gives approximately the 48 correct amount of command execution time [all...] |
/u-boot/lib/efi_loader/ |
H A D | efi_runtime.c | 100 * payload are running concurrently at the same time. In this mode, we can 223 * efi_reset_system_boottime() - reset system at boot time 272 * efi_get_time_boottime() - get current time at boot time 280 * @time: pointer to structure to receive current time 285 struct efi_time *time, 293 EFI_ENTRY("%p %p", time, capabilities); 295 if (!time) { 309 memset(time, 284 efi_get_time_boottime( struct efi_time *time, struct efi_time_cap *capabilities) argument 347 efi_validate_time(struct efi_time *time) argument 375 efi_set_time_boottime(struct efi_time *time) argument 473 efi_get_time( struct efi_time *time, struct efi_time_cap *capabilities) argument 493 efi_set_time(struct efi_time *time) argument [all...] |
/u-boot/boot/ |
H A D | image-host.c | 11 #include <time.h>
|
/u-boot/arch/arm/mach-versal/ |
H A D | clk.c | 9 #include <time.h>
|
/u-boot/arch/arm/mach-versal-net/ |
H A D | clk.c | 11 #include <time.h>
|
/u-boot/arch/sh/include/asm/ |
H A D | macro.h | 28 .macro wait_timer, time 29 mov.l \time ,r3
|
/u-boot/arch/arm/mach-zynqmp/ |
H A D | clk.c | 9 #include <time.h>
|
/u-boot/drivers/ram/ |
H A D | imxrt_sdram.c | 240 struct imxrt_sdram_timing *time = params->sdram_timing; local 273 writel(time->pre2act << SEMC_SDRAMCR1_PRE2ACT_SHIFT 274 | time->act2rw << SEMC_SDRAMCR1_ACT2RW_SHIFT 275 | time->rfrc << SEMC_SDRAMCR1_RFRC_SHIFT 276 | time->wrc << SEMC_SDRAMCR1_WRC_SHIFT 277 | time->ckeoff << SEMC_SDRAMCR1_CKEOFF_SHIFT 278 | time->act2pre << SEMC_SDRAMCR1_ACT2PRE_SHIFT, 281 writel(time->srrc << SEMC_SDRAMCR2_SRRC_SHIFT 282 | time->ref2ref << SEMC_SDRAMCR2_REF2REF_SHIFT 283 | time [all...] |