timex.h 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * linux/include/asm-m68k/timex.h
  4. *
  5. * m68k architecture timex specifications
  6. */
  7. #ifndef _ASMm68K_TIMEX_H
  8. #define _ASMm68K_TIMEX_H
  9. #ifdef CONFIG_COLDFIRE
  10. /*
  11. * CLOCK_TICK_RATE should give the underlying frequency of the tick timer
  12. * to make ntp work best. For Coldfires, that's the main clock.
  13. */
  14. #include <asm/coldfire.h>
  15. #define CLOCK_TICK_RATE MCF_CLK
  16. #else
  17. /*
  18. * This default CLOCK_TICK_RATE is probably wrong for many 68k boards
  19. * Users of those boards will need to check and modify accordingly
  20. */
  21. #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
  22. #endif
  23. typedef unsigned long cycles_t;
  24. static inline cycles_t get_cycles(void)
  25. {
  26. return 0;
  27. }
  28. extern unsigned long (*mach_random_get_entropy)(void);
  29. static inline unsigned long random_get_entropy(void)
  30. {
  31. if (mach_random_get_entropy)
  32. return mach_random_get_entropy();
  33. return 0;
  34. }
  35. #define random_get_entropy random_get_entropy
  36. #endif