clock.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* ASB2303-specific clocks
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. #ifndef _ASM_UNIT_CLOCK_H
  12. #define _ASM_UNIT_CLOCK_H
  13. #ifndef __ASSEMBLY__
  14. #ifdef CONFIG_MN10300_RTC
  15. extern unsigned long mn10300_ioclk; /* IOCLK (crystal speed) in HZ */
  16. extern unsigned long mn10300_iobclk;
  17. extern unsigned long mn10300_tsc_per_HZ;
  18. #define MN10300_IOCLK ((unsigned long)mn10300_ioclk)
  19. /* If this processors has a another clock, uncomment the below. */
  20. /* #define MN10300_IOBCLK ((unsigned long)mn10300_iobclk) */
  21. #else /* !CONFIG_MN10300_RTC */
  22. #define MN10300_IOCLK 33333333UL
  23. /* #define MN10300_IOBCLK 66666666UL */
  24. #endif /* !CONFIG_MN10300_RTC */
  25. #define MN10300_JCCLK MN10300_IOCLK
  26. #define MN10300_TSCCLK MN10300_IOCLK
  27. #ifdef CONFIG_MN10300_RTC
  28. #define MN10300_TSC_PER_HZ ((unsigned long)mn10300_tsc_per_HZ)
  29. #else /* !CONFIG_MN10300_RTC */
  30. #define MN10300_TSC_PER_HZ (MN10300_TSCCLK/HZ)
  31. #endif /* !CONFIG_MN10300_RTC */
  32. #endif /* !__ASSEMBLY__ */
  33. #endif /* _ASM_UNIT_CLOCK_H */