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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/* $Id: delay.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $
2
 * delay.h: Linux delay routines on the Sparc.
3
 *
4
 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu).
5
 */
6
 
7
#ifndef __SPARC_DELAY_H
8
#define __SPARC_DELAY_H
9
 
10
extern unsigned long loops_per_sec;
11
 
12
extern __inline__ void __delay(unsigned long loops)
13
{
14
        __asm__ __volatile__("cmp %0, 0\n\t"
15
                             "1: bne 1b\n\t"
16
                             "subcc %0, 1, %0\n" :
17
                             "=&r" (loops) :
18
                             "0" (loops));
19
}
20
 
21
/* This is too messy with inline asm on the Sparc. */
22
extern void udelay(unsigned long usecs);
23
 
24
/* calibrate_delay() wants this... */
25
#define muldiv(a, b, c)    (((a)*(b))/(c))
26
 
27
#endif /* defined(__SPARC_DELAY_H) */
28
 

powered by: WebSVN 2.1.0

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