Searched refs:ticks (Results 1 - 21 of 21) sorted by relevance

/u-boot/arch/powerpc/lib/
H A Dtime.c21 ulong ticks;
24 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
26 ticks = ((usec / 10) * (get_tbclk() / 100000));
29 return (ticks);
36 * microseconds to wait) into a number of time base ticks; then we
41 ulong ticks = usec2ticks (usec);
42 wait_ticks (ticks); local
47 unsigned long ticks2usec(unsigned long ticks)
51 /* usec = ticks * 1000000 / tbclk
52 * Multiplication would overflow at ~4.2e3 ticks,
22 ulong ticks; local
48 ticks2usec(unsigned long ticks) argument
[all...]
H A DMakefile25 obj-y += ticks.o
33 obj-y += ticks.o
/u-boot/arch/arm/cpu/armv8/
H A Dgeneric_timer.c93 unsigned long ticks = timer_read_counter();
95 gd->arch.tbl = ticks;
97 return ticks;
102 ulong ticks;
104 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
106 ticks = ((usec / 10) * (get_tbclk() / 100000));
108 return ticks;
94 unsigned long ticks = timer_read_counter(); local
103 ulong ticks; local
/u-boot/arch/arm/include/asm/arch-armv7/
H A Dgenerictimer.h30 * ticks: The freq is based on generic timer.
32 .macro timer_wait reg, ticks
33 movw \reg, #(\ticks & 0xffff)
34 movt \reg, #(\ticks >> 16)
/u-boot/arch/powerpc/cpu/mpc85xx/
H A Dspl_minimal.c36 u32 ticks = ticks_per_usec * usec;
39 while ((mfspr(SPRN_TBRL) - s) < ticks);
37 u32 ticks = ticks_per_usec * usec; local
/u-boot/drivers/timer/
H A Driscv_aclint_timer.c52 u64 ticks = 0; local
58 timer_get_count(gd->timer, &ticks);
61 ticks = readq((void __iomem *)MTIME_REG(RISCV_MMODE_TIMERBASE,
66 return lldiv(ticks * 1000, (rate / 1000));
H A Driscv_timer.c59 u64 ticks = 0; local
65 timer_get_count(gd->timer, &ticks);
68 ticks = riscv_timer_get_count(NULL);
72 return lldiv(ticks * 1000, (rate / 1000));
H A Domap-timer.c89 u64 ticks = 0;
98 timer_get_count(gd->timer, &ticks);
103 us = (ticks * 1000) / rate;
90 u64 ticks = 0; local
H A Dcadence-ttc.c41 u64 ticks = 0;
50 timer_get_count(gd->timer, &ticks);
55 us = (ticks * 1000) / rate;
42 u64 ticks = 0; local
H A Dorion-timer.c96 u64 ticks; local
98 ticks = timer_early_get_count();
99 return lldiv(ticks * 1000, timer_early_get_rate());
H A Drockchip_timer.c46 uint64_t ticks = 0;
56 timer_get_count(gd->timer, &ticks);
75 ticks = ~0uLL - rockchip_timer_get_curr_value(timer);
84 us = (ticks * 1000) / rate;
47 uint64_t ticks = 0; local
H A Dmpc83xx_timer.c187 void wait_ticks(ulong ticks) argument
189 ulong end = get_ticks() + ticks;
/u-boot/arch/arm/cpu/armv7/ls102xa/
H A Dtimer.c24 ulong ticks;
27 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
29 ticks = ((usec / 10) * (get_tbclk() / 100000));
31 return ticks;
108 tmo = us_to_tick(usec); /* convert usecs to ticks */
116 * On ARM it returns the number of timer ticks per second.
25 ulong ticks; local
/u-boot/arch/arm/mach-imx/
H A Dsyscounter.c28 ulong ticks; local
31 ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
33 ticks = ((usec / 10) * (get_tbclk() / 100000));
35 return ticks;
126 * On ARM it returns the number of timer ticks per second.
/u-boot/arch/arm/mach-bcm283x/
H A Dreset.c25 /* max ticks timeout */
33 __reset_cpu(struct bcm2835_wdog_regs *wdog_regs, ulong ticks) argument
37 if (ticks == 0) {
41 timeout = ticks & BCM2835_WDOG_MAX_TIMEOUT;
/u-boot/drivers/watchdog/
H A Dat91sam9_wdt.c43 u32 ticks;
45 /* Calculate timeout in seconds and the resulting ticks */
49 ticks = WDT_SEC2TICKS(timeout);
66 | AT91_WDT_MR_WDV(ticks); /* timer value */
44 u32 ticks; local
/u-boot/include/
H A Dtime.h40 * usec_to_tick() - convert microseconds to clock ticks
43 * Return: duration in clock ticks
106 * usec2ticks() - Convert microseconds to internal ticks
109 * Return: Corresponding internal ticks value, calculated using get_tbclk()
114 * ticks2usec() - Convert internal ticks to microseconds
116 * @ticks: Value of ticks to convert
119 ulong ticks2usec(unsigned long ticks);
122 * wait_ticks() - waits a given number of ticks
127 * @ticks
[all...]
H A Dcommand.h275 * @param ticks If ticks is not null, this function set it to the
276 * number of ticks the command took to complete.
280 int *repeatable, unsigned long *ticks);
/u-boot/drivers/memory/
H A Dti-gpmc.c153 static __maybe_unused unsigned int gpmc_clk_ticks_to_ns(unsigned int ticks, int cs,
156 return ticks * gpmc_get_clk_period(cs, cd) / 1000;
206 * tick format: gpmc,name = <value> /&zwj;* x ns -- y ns; x ticks *&zwj;/
245 printf("gpmc,%s = <%u>; /* %u ns - %u ns; %i ticks%s*/\n",
391 int ticks, mask, nr_bits;
394 ticks = 0;
396 ticks = gpmc_ns_to_clk_ticks(time, cs, cd);
403 if (ticks > max) {
404 pr_err("%s: GPMC CS%d: %s %d ns, %d ticks > %d ticks\
154 gpmc_clk_ticks_to_ns(unsigned int ticks, int cs, enum gpmc_clk_domain cd) argument
392 int ticks, mask, nr_bits; local
[all...]
/u-boot/common/
H A Dcommand.c589 int *repeatable, ulong *ticks)
635 if (ticks)
636 *ticks = get_timer(0);
638 if (ticks)
639 *ticks = get_timer(*ticks);
587 cmd_process(int flag, int argc, char *const argv[], int *repeatable, ulong *ticks) argument
/u-boot/drivers/mtd/nand/raw/
H A Docteontx_nand.c542 int ticks; local
551 ticks = DIV_ROUND_UP(ns, 1000);
554 if (ticks)
555 ticks--;
557 return ticks;

Completed in 283 milliseconds