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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-or32/] [delay.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _OR32_DELAY_H
2
#define _OR32_DELAY_H
3
 
4
extern unsigned long loops_per_sec;
5
#include <linux/kernel.h>
6
#include <linux/config.h>
7
 
8
extern __inline__ void __delay(unsigned long loops)
9
{
10
        __asm__ __volatile__ ("1: l.sfeqi %0,0; \
11
                                l.bnf   1b; \
12
                                l.addi %0,%0,-1;"
13
                                : "=r" (loops) : "0" (loops));
14
}
15
 
16
extern __inline__ void udelay(unsigned long usecs)
17
{
18
        /* Sigh */
19
        __delay(usecs);
20
}
21
 
22
#define muldiv(a, b, c)    (((a)*(b))/(c))
23
 
24
#endif /* defined(_OR32_DELAY_H) */

powered by: WebSVN 2.1.0

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