blob: 651332aeec22db781a0af12181210515b788a990 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright 2003 PathScale, Inc.
3 * Copied from arch/x86_64
4 *
5 * Licensed under the GPL
6 */
7
Bodo Stroesser5fd861b2005-05-05 16:15:37 -07008#include "linux/delay.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include "asm/processor.h"
Bodo Stroesser5fd861b2005-05-05 16:15:37 -070010#include "asm/param.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
12void __delay(unsigned long loops)
13{
14 unsigned long i;
15
16 for(i = 0; i < loops; i++) ;
17}
18
Bodo Stroesser5fd861b2005-05-05 16:15:37 -070019void __udelay(unsigned long usecs)
20{
21 int i, n;
22
23 n = (loops_per_jiffy * HZ * usecs) / MILLION;
24 for(i=0;i<n;i++) ;
25}
26
27void __const_udelay(unsigned long usecs)
28{
29 int i, n;
30
31 n = (loops_per_jiffy * HZ * usecs) / MILLION;
32 for(i=0;i<n;i++) ;
33}
34
Linus Torvalds1da177e2005-04-16 15:20:36 -070035/*
36 * Overrides for Emacs so that we follow Linus's tabbing style.
37 * Emacs will notice this stuff at the end of the file and automatically
38 * adjust the settings for this buffer only. This must remain at the end
39 * of the file.
40 * ---------------------------------------------------------------------------
41 * Local variables:
42 * c-file-style: "linux"
43 * End:
44 */