OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [asm-or32/] [delay.h] - Rev 1765

Compare with Previous | Blame | View Log

#ifndef _OR32_DELAY_H
#define _OR32_DELAY_H
 
extern unsigned long loops_per_sec;
#include <linux/kernel.h>
#include <linux/config.h>
 
extern __inline__ void __delay(unsigned long loops)
{
	__asm__ __volatile__ ("1: l.sfeqi %0,0; \
				l.bnf	1b; \
				l.addi %0,%0,-1;"
				: "=r" (loops) : "0" (loops));
}
 
extern __inline__ void udelay(unsigned long usecs)
{
	/* Sigh */
	__delay(usecs);
}
 
#define muldiv(a, b, c)    (((a)*(b))/(c))
 
#endif /* defined(_OR32_DELAY_H) */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.