| /openbmc/u-boot/arch/powerpc/lib/ |
| H A D | time.c | 19 ulong ticks; in usec2ticks() local 22 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000; in usec2ticks() 24 ticks = ((usec / 10) * (get_tbclk() / 100000)); in usec2ticks() 27 return (ticks); in usec2ticks() 39 ulong ticks = usec2ticks (usec); in __udelay() local 40 wait_ticks (ticks); in __udelay() 45 unsigned long ticks2usec(unsigned long ticks) in ticks2usec() argument 54 ticks *= 1000L; in ticks2usec() 55 ticks /= tbclk; in ticks2usec() 56 ticks *= 1000L; in ticks2usec() [all …]
|
| H A D | Makefile | 21 obj-y += ticks.o 29 obj-y += ticks.o
|
| /openbmc/u-boot/arch/arm/cpu/arm920t/ep93xx/ |
| H A D | timer.c | 28 unsigned long long ticks; member 34 unsigned long long ticks = (unsigned long long)usecs * TIMER_FREQ; in usecs_to_ticks() local 35 do_div(ticks, 1000 * 1000); in usecs_to_ticks() 37 return ticks; in usecs_to_ticks() 46 timer.ticks += now - timer.last_read; in read_timer() 49 timer.ticks += TIMER_MAX_VAL - timer.last_read + now; in read_timer() 63 sys_ticks = timer.ticks * CONFIG_SYS_HZ; in get_ticks() 80 target = timer.ticks + usecs_to_ticks(usec); in __udelay() 82 while (timer.ticks < target) in __udelay() 102 timer.ticks = 0; in timer_init()
|
| /openbmc/u-boot/arch/arm/cpu/armv8/ |
| H A D | generic_timer.c | 90 unsigned long ticks = timer_read_counter(); in get_ticks() local 92 gd->arch.tbl = ticks; in get_ticks() 94 return ticks; in get_ticks() 99 ulong ticks; in usec2ticks() local 101 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000; in usec2ticks() 103 ticks = ((usec / 10) * (get_tbclk() / 100000)); in usec2ticks() 105 return ticks; in usec2ticks()
|
| /openbmc/qemu/tests/qtest/ |
| H A D | tco-test.c | 40 #define TCO_TICKS_TO_SECS(ticks) (((ticks) * 6) / 10) argument 107 static void set_tco_timeout(const TestData *d, uint16_t ticks) in set_tco_timeout() argument 109 qpci_io_writew(d->dev, d->tco_io_bar, TCO_TMR, ticks); in set_tco_timeout() 165 const uint16_t ticks = TCO_SECS_TO_TICKS(4); in test_tco_timeout() local 176 set_tco_timeout(&d, ticks); in test_tco_timeout() 179 qtest_clock_step(d.qts, ticks * TCO_TICK_NSEC); in test_tco_timeout() 194 qtest_clock_step(d.qts, ticks * TCO_TICK_NSEC); in test_tco_timeout() 209 const uint16_t ticks = 0xffff; in test_tco_max_timeout() local 220 set_tco_timeout(&d, ticks); in test_tco_max_timeout() 223 qtest_clock_step(d.qts, ((ticks & TCO_TMR_MASK) - 1) * TCO_TICK_NSEC); in test_tco_max_timeout() [all …]
|
| H A D | sse-timer-test.c | 55 static void clock_step_ticks(uint64_t ticks) in clock_step_ticks() argument 62 assert(!(ticks & 3)); in clock_step_ticks() 63 clock_step(FOUR_TICKS * (ticks >> 2)); in clock_step_ticks()
|
| /openbmc/qemu/system/ |
| H A D | cpu-timers.c | 45 int64_t ticks = timers_state.cpu_ticks_offset; in cpu_get_ticks_locked() local 47 ticks += cpu_get_host_ticks(); in cpu_get_ticks_locked() 50 if (timers_state.cpu_ticks_prev > ticks) { in cpu_get_ticks_locked() 52 timers_state.cpu_ticks_offset += timers_state.cpu_ticks_prev - ticks; in cpu_get_ticks_locked() 53 ticks = timers_state.cpu_ticks_prev; in cpu_get_ticks_locked() 56 timers_state.cpu_ticks_prev = ticks; in cpu_get_ticks_locked() 57 return ticks; in cpu_get_ticks_locked() 66 int64_t ticks; in cpu_get_ticks() local 69 ticks = cpu_get_ticks_locked(); in cpu_get_ticks() 71 return ticks; in cpu_get_ticks()
|
| /openbmc/u-boot/doc/SPI/ |
| H A D | README.sandbox-spi | 38 0 erase: 1 ticks, 1024000 KiB/s 8192.000 Mbps 39 1 check: 2 ticks, 512000 KiB/s 4096.000 Mbps 40 2 write: 6 ticks, 170666 KiB/s 1365.328 Mbps 41 3 read: 0 ticks, 1048576000 KiB/s -201326.-592 Mbps 43 0 erase: 1 ticks, 1024000 KiB/s 8192.000 Mbps 44 1 check: 2 ticks, 512000 KiB/s 4096.000 Mbps 45 2 write: 6 ticks, 170666 KiB/s 1365.328 Mbps 46 3 read: 0 ticks, 1048576000 KiB/s -201326.-592 Mbps
|
| /openbmc/u-boot/arch/arm/cpu/armv7/ls102xa/ |
| H A D | timer.c | 21 ulong ticks; in usec2ticks() local 24 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000; in usec2ticks() 26 ticks = ((usec / 10) * (get_tbclk() / 100000)); in usec2ticks() 28 return ticks; in usec2ticks()
|
| /openbmc/u-boot/arch/arm/mach-imx/ |
| H A D | syscounter.c | 24 ulong ticks; in usec2ticks() local 27 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000; in usec2ticks() 29 ticks = ((usec / 10) * (get_tbclk() / 100000)); in usec2ticks() 31 return ticks; in usec2ticks()
|
| /openbmc/u-boot/arch/arm/include/asm/arch-armv7/ |
| H A D | generictimer.h | 32 .macro timer_wait reg, ticks 33 movw \reg, #(\ticks & 0xffff) 34 movt \reg, #(\ticks >> 16)
|
| /openbmc/u-boot/arch/arm/mach-bcm283x/ |
| H A D | reset.c | 35 void __efi_runtime reset_cpu(ulong ticks) in reset_cpu() argument 39 if (ticks == 0) { in reset_cpu() 43 timeout = ticks & BCM2835_WDOG_MAX_TIMEOUT; in reset_cpu()
|
| /openbmc/qemu/hw/misc/ |
| H A D | mps2-fpgaio.c | 66 uint64_t ticks = muldiv64(elapsed, s->prescale_clk, NANOSECONDS_PER_SECOND); in resync_counter() local 73 if (ticks == 0) { in resync_counter() 76 } else if (ticks < s->pscntr) { in resync_counter() 78 s->pscntr -= ticks; in resync_counter() 86 s->counter += ticks - s->pscntr; in resync_counter() 108 uint64_t y = ticks - s->pscntr + s->prescale; in resync_counter() 119 s->pscntr_sync_ticks += muldiv64(ticks, NANOSECONDS_PER_SECOND, in resync_counter()
|
| /openbmc/qemu/hw/timer/ |
| H A D | nrf51_timer.c | 35 static int64_t ticks_to_ns(NRF51TimerState *s, uint32_t ticks) in ticks_to_ns() argument 39 return muldiv64(ticks, NANOSECONDS_PER_SECOND, freq); in ticks_to_ns() 45 uint32_t ticks = ns_to_ticks(s, now - s->update_counter_ns); in update_counter() local 47 s->counter = (s->counter + ticks) % BIT(bitwidths[s->bitmode]); in update_counter() 53 s->update_counter_ns += ticks_to_ns(s, ticks); in update_counter() 54 return ticks; in update_counter() 104 uint32_t ticks; in timer_expire() local 116 ticks = update_counter(s, now); in timer_expire() 119 if (cc_remaining[i] <= ticks) { in timer_expire()
|
| H A D | sse-counter.c | 143 uint64_t ticks; in sse_counter_for_timestamp() local 150 ticks = clock_ns_to_ticks(s->clk, now - s->ns_then); in sse_counter_for_timestamp() 163 ticks = muldiv64(ticks, s->cntscr0, 0x01000000); in sse_counter_for_timestamp() 165 return s->ticks_then + ticks; in sse_counter_for_timestamp()
|
| H A D | stm32f2xx_timer.c | 76 uint64_t ticks; in stm32f2xx_timer_set_alarm() local 86 ticks = s->tim_arr - (now_ticks - s->tick_offset); in stm32f2xx_timer_set_alarm() 88 DB_PRINT("Alarm set in %d ticks\n", (int) ticks); in stm32f2xx_timer_set_alarm() 90 s->hit_time = muldiv64((ticks + (uint64_t) now_ticks) * (s->tim_psc + 1), in stm32f2xx_timer_set_alarm()
|
| /openbmc/u-boot/drivers/timer/ |
| H A D | rockchip_timer.c | 43 uint64_t ticks = 0; in timer_get_boot_us() local 53 timer_get_count(gd->timer, &ticks); in timer_get_boot_us() 73 ticks = ~0uLL - rockchip_timer_get_curr_value(timer); in timer_get_boot_us() 83 us = (ticks * 1000) / rate; in timer_get_boot_us()
|
| H A D | cadence-ttc.c | 37 u64 ticks = 0; in timer_get_boot_us() local 46 timer_get_count(gd->timer, &ticks); in timer_get_boot_us() 51 us = (ticks * 1000) / rate; in timer_get_boot_us()
|
| /openbmc/qemu/hw/ppc/ |
| H A D | ppc_booke.c | 147 uint64_t delta_tick, ticks = 0; in booke_update_fixed_timer() local 167 ticks = period; in booke_update_fixed_timer() 170 if (ticks + delta_tick < ticks) { in booke_update_fixed_timer() 172 ticks = UINT64_MAX; in booke_update_fixed_timer() 174 ticks += delta_tick; in booke_update_fixed_timer() 177 *next = now + muldiv64(ticks, NANOSECONDS_PER_SECOND, tb_env->tb_freq); in booke_update_fixed_timer()
|
| /openbmc/u-boot/arch/powerpc/cpu/mpc85xx/ |
| H A D | spl_minimal.c | 40 u32 ticks = ticks_per_usec * usec; in udelay() local 43 while ((mfspr(SPRN_TBRL) - s) < ticks); in udelay()
|
| /openbmc/bmcweb/redfish-core/src/utils/ |
| H A D | time_utils.cpp | 73 uint64_t ticks = 0; in fromDurationString() local 74 auto [ptr, ec] = std::from_chars(v.begin(), v.end(), ticks); in fromDurationString() 92 out += std::chrono::days(ticks); in fromDurationString() 100 out += std::chrono::hours(ticks); in fromDurationString() 108 out += std::chrono::minutes(ticks); in fromDurationString() 116 out += std::chrono::seconds(ticks); in fromDurationString() 125 out += std::chrono::seconds(ticks); in fromDurationString() 140 ticks *= 100; in fromDurationString() 144 ticks *= 10; in fromDurationString() 146 out += std::chrono::milliseconds(ticks); in fromDurationString()
|
| /openbmc/qemu/hw/rtc/ |
| H A D | pl031.c | 68 uint32_t ticks; in pl031_set_alarm() local 72 ticks = s->mr - pl031_get_count(s); in pl031_set_alarm() 73 trace_pl031_set_alarm(ticks); in pl031_set_alarm() 74 if (ticks == 0) { in pl031_set_alarm() 79 timer_mod(s->timer, now + (int64_t)ticks * NANOSECONDS_PER_SECOND); in pl031_set_alarm()
|
| /openbmc/qemu/docs/specs/ |
| H A D | rapl-msr.rst | 90 dividing the time in clock ticks. The number of clock ticks per second can be 91 found by the sysconf system call. A typical value of clock ticks per second is 92 100. So a core can run a process at the maximum of 100 ticks per second. If a 93 package has 4 cores, 400 ticks maximum can be scheduled on all the cores 98 of ticks the process has been scheduled in userspace (utime) and kernel 108 A 4 cores package can schedule a maximum of 400 ticks per second with 100 ticks 109 per second per core. If a thread was scheduled for 100 ticks between a second
|
| /openbmc/u-boot/doc/ |
| H A D | README.440-DDR-performance | 25 (= 112345 clock ticks) 27 at least 20 clock ticks per test. 66 (= 120066 clock ticks) 68 at least 20 clock ticks per test.
|
| /openbmc/u-boot/common/ |
| H A D | command.c | 572 int *repeatable, ulong *ticks) in cmd_process() argument 604 if (ticks) in cmd_process() 605 *ticks = get_timer(0); in cmd_process() 607 if (ticks) in cmd_process() 608 *ticks = get_timer(*ticks); in cmd_process()
|