/*1* Copyright 2010 Tilera Corporation. All Rights Reserved.2*3* This program is free software; you can redistribute it and/or4* modify it under the terms of the GNU General Public License5* as published by the Free Software Foundation, version 2.6*7* This program is distributed in the hope that it will be useful, but8* WITHOUT ANY WARRANTY; without even the implied warranty of9* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or10* NON INFRINGEMENT. See the GNU General Public License for11* more details.12*/1314#ifndef _ASM_TILE_DELAY_H15#define _ASM_TILE_DELAY_H1617/* Undefined functions to get compile-time errors. */18extern void __bad_udelay(void);19extern void __bad_ndelay(void);2021extern void __udelay(unsigned long usecs);22extern void __ndelay(unsigned long nsecs);23extern void __delay(unsigned long loops);2425#define udelay(n) (__builtin_constant_p(n) ? \26((n) > 20000 ? __bad_udelay() : __ndelay((n) * 1000)) : \27__udelay(n))2829#define ndelay(n) (__builtin_constant_p(n) ? \30((n) > 20000 ? __bad_ndelay() : __ndelay(n)) : \31__ndelay(n))3233#endif /* _ASM_TILE_DELAY_H */343536