URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-or32/] [delay.h] - Rev 1774
Go to most recent revision | Compare with Previous | Blame | View Log
#ifndef _OR32_DELAY_H #define _OR32_DELAY_H #include <linux/config.h> #include <linux/linkage.h> extern __inline__ void __delay(int loops) { __asm__ __volatile__ ( "l.srli %0,%0,1;" "1: l.sfeqi %0,0;" "l.bnf 1b;" "l.addi %0,%0,-1;" : "=r" (loops): "0" (loops)); } /* Use only for very small delays ( < 1 msec). */ extern unsigned long loops_per_usec; extern __inline__ void udelay(unsigned long usecs) { __delay(usecs * loops_per_usec); } #endif
Go to most recent revision | Compare with Previous | Blame | View Log