Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
score
include
asm
delay.h
Go to the documentation of this file.
1
#ifndef _ASM_SCORE_DELAY_H
2
#define _ASM_SCORE_DELAY_H
3
4
#include <asm-generic/param.h>
5
6
static
inline
void
__delay
(
unsigned
long
loops)
7
{
8
/* 3 cycles per loop. */
9
__asm__
__volatile__ (
10
"1:\tsubi\t%0, 3\n\t"
11
"cmpz.c\t%0\n\t"
12
"ble\t1b\n\t"
13
:
"=r"
(loops)
14
:
"0"
(loops));
15
}
16
17
static
inline
void
__udelay
(
unsigned
long
usecs
)
18
{
19
unsigned
long
loops_per_usec
;
20
21
loops_per_usec = (
loops_per_jiffy
*
HZ
) / 1000000;
22
23
__delay
(usecs * loops_per_usec);
24
}
25
26
#define udelay(usecs) __udelay(usecs)
27
28
#endif
/* _ASM_SCORE_DELAY_H */
Generated on Thu Jan 10 2013 12:49:20 for Linux Kernel by
1.8.2