delay.c 872 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2003 PathScale, Inc.
  3. * Copied from arch/x86_64
  4. *
  5. * Licensed under the GPL
  6. */
  7. #include "linux/delay.h"
  8. #include "asm/processor.h"
  9. #include "asm/param.h"
  10. void __delay(unsigned long loops)
  11. {
  12. unsigned long i;
  13. for(i = 0; i < loops; i++) ;
  14. }
  15. void __udelay(unsigned long usecs)
  16. {
  17. int i, n;
  18. n = (loops_per_jiffy * HZ * usecs) / MILLION;
  19. for(i=0;i<n;i++) ;
  20. }
  21. void __const_udelay(unsigned long usecs)
  22. {
  23. int i, n;
  24. n = (loops_per_jiffy * HZ * usecs) / MILLION;
  25. for(i=0;i<n;i++) ;
  26. }
  27. /*
  28. * Overrides for Emacs so that we follow Linus's tabbing style.
  29. * Emacs will notice this stuff at the end of the file and automatically
  30. * adjust the settings for this buffer only. This must remain at the end
  31. * of the file.
  32. * ---------------------------------------------------------------------------
  33. * Local variables:
  34. * c-file-style: "linux"
  35. * End:
  36. */