/u-boot/arch/powerpc/lib/ |
H A D | time.c | 21 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 D | Makefile | 25 obj-y += ticks.o 33 obj-y += ticks.o
|
/u-boot/arch/arm/cpu/armv8/ |
H A D | generic_timer.c | 93 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 D | generictimer.h | 30 * 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 D | spl_minimal.c | 36 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 D | riscv_aclint_timer.c | 52 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 D | riscv_timer.c | 59 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 D | omap-timer.c | 89 u64 ticks = 0; 98 timer_get_count(gd->timer, &ticks); 103 us = (ticks * 1000) / rate; 90 u64 ticks = 0; local
|
H A D | cadence-ttc.c | 41 u64 ticks = 0; 50 timer_get_count(gd->timer, &ticks); 55 us = (ticks * 1000) / rate; 42 u64 ticks = 0; local
|
H A D | orion-timer.c | 96 u64 ticks; local 98 ticks = timer_early_get_count(); 99 return lldiv(ticks * 1000, timer_early_get_rate());
|
H A D | rockchip_timer.c | 46 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 D | mpc83xx_timer.c | 187 void wait_ticks(ulong ticks) argument 189 ulong end = get_ticks() + ticks;
|
/u-boot/arch/arm/cpu/armv7/ls102xa/ |
H A D | timer.c | 24 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 D | syscounter.c | 28 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 D | reset.c | 25 /* 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 D | at91sam9_wdt.c | 43 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 D | time.h | 40 * 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 D | command.h | 275 * @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 D | ti-gpmc.c | 153 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> /‍* x ns -- y ns; x ticks *‍/ 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 D | command.c | 589 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 D | octeontx_nand.c | 542 int ticks; local 551 ticks = DIV_ROUND_UP(ns, 1000); 554 if (ticks) 555 ticks--; 557 return ticks;
|