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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-sparc/] [delay.h] - Diff between revs 1765 and 1782

Only display areas with differences | Details | Blame | View Log

Rev 1765 Rev 1782
/* $Id: delay.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $
/* $Id: delay.h,v 1.1 2005-12-20 11:32:11 jcastillo Exp $
 * delay.h: Linux delay routines on the Sparc.
 * delay.h: Linux delay routines on the Sparc.
 *
 *
 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu).
 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu).
 */
 */
 
 
#ifndef __SPARC_DELAY_H
#ifndef __SPARC_DELAY_H
#define __SPARC_DELAY_H
#define __SPARC_DELAY_H
 
 
extern unsigned long loops_per_sec;
extern unsigned long loops_per_sec;
 
 
extern __inline__ void __delay(unsigned long loops)
extern __inline__ void __delay(unsigned long loops)
{
{
        __asm__ __volatile__("cmp %0, 0\n\t"
        __asm__ __volatile__("cmp %0, 0\n\t"
                             "1: bne 1b\n\t"
                             "1: bne 1b\n\t"
                             "subcc %0, 1, %0\n" :
                             "subcc %0, 1, %0\n" :
                             "=&r" (loops) :
                             "=&r" (loops) :
                             "0" (loops));
                             "0" (loops));
}
}
 
 
/* This is too messy with inline asm on the Sparc. */
/* This is too messy with inline asm on the Sparc. */
extern void udelay(unsigned long usecs);
extern void udelay(unsigned long usecs);
 
 
/* calibrate_delay() wants this... */
/* calibrate_delay() wants this... */
#define muldiv(a, b, c)    (((a)*(b))/(c))
#define muldiv(a, b, c)    (((a)*(b))/(c))
 
 
#endif /* defined(__SPARC_DELAY_H) */
#endif /* defined(__SPARC_DELAY_H) */
 
 
 
 

powered by: WebSVN 2.1.0

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