timex.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (C) 2004-2006 Atmel Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef __ASM_AVR32_TIMEX_H
  9. #define __ASM_AVR32_TIMEX_H
  10. /*
  11. * This is the frequency of the timer used for Linux's timer interrupt.
  12. * The value should be defined as accurate as possible or under certain
  13. * circumstances Linux timekeeping might become inaccurate or fail.
  14. *
  15. * For many system the exact clockrate of the timer isn't known but due to
  16. * the way this value is used we can get away with a wrong value as long
  17. * as this value is:
  18. *
  19. * - a multiple of HZ
  20. * - a divisor of the actual rate
  21. *
  22. * 500000 is a good such cheat value.
  23. *
  24. * The obscure number 1193182 is the same as used by the original i8254
  25. * time in legacy PC hardware; the chip is never found in AVR32 systems.
  26. */
  27. #define CLOCK_TICK_RATE 500000 /* Underlying HZ */
  28. typedef unsigned long cycles_t;
  29. static inline cycles_t get_cycles (void)
  30. {
  31. return 0;
  32. }
  33. #define ARCH_HAS_READ_CURRENT_TIMER
  34. #endif /* __ASM_AVR32_TIMEX_H */