예제 #1
0
void ndelay (unsigned long nsec)		/* delay in nano-seconds */
{
	u64 delta = usec_to_tick(nsec);		/* time to wait */

	delta /= 1000ull;			/* remember: nsec not usec ! */

	tick_delay (delta);			/* wait ... */
}
예제 #2
0
void __weak __udelay(unsigned long usec)
{
	uint64_t tmp;

	tmp = get_ticks() + usec_to_tick(usec);	/* get current timestamp */

	while (get_ticks() < tmp+1)	/* loop till event */
		 /*NOP*/;
}
예제 #3
0
void __udelay(unsigned long usec)
{
	unsigned long long start;
	ulong tmo;

	start = get_ticks();		/* get current timestamp */
	tmo = usec_to_tick(usec);	/* convert usecs to ticks */
	while ((get_ticks() - start) < tmo)
		;			/* loop till time has passed */
}
예제 #4
0
void udelay(unsigned long usec)
{
	unsigned long long tmp;
	ulong tmo;

	tmo = usec_to_tick(usec);
	tmp = get_ticks() + tmo;	/* get current timestamp */

	while (get_ticks() < tmp)	/* loop till event */
		 /*NOP*/;
}
예제 #5
0
void rockchip_udelay(unsigned int usec)
{
    uint64_t tmp;

    /* get timestamp */
    tmp = rockchip_get_ticks() + usec_to_tick(usec);

    /* loop till event */
    while (rockchip_get_ticks() < tmp+1)
        ;
}
예제 #6
0
/* delay x useconds */
void __udelay(unsigned long usec)
{
    long long tmo;
    long long now, last;

    tmo = usec_to_tick(usec);

    /* get current timestamp */
    last = get_rk_current_tick();
    while (tmo > 0)	/* loop till event */
    {
        now = get_rk_current_tick();
        if (last >= now) {
            tmo -= last - now;
        } else {
            tmo -= 0xFFFFFFFF + last - now;
        }
        last = now;
    }
}
예제 #7
0
void udelay (unsigned long usec)		/* delay in micro-seconds */
{
	u64 delta = usec_to_tick(usec);		/* time to wait */

	tick_delay (delta);			/* wait ... */
}