systimer.h 777 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * (C) Copyright 2010 Linaro
  3. * Matt Waddel, <matt.waddel@linaro.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _SYSTIMER_H_
  8. #define _SYSTIMER_H_
  9. /* AMBA timer register base address */
  10. #define SYSTIMER_BASE 0x10011000
  11. #define SYSHZ_CLOCK 1000000 /* Timers -> 1Mhz */
  12. #define SYSTIMER_RELOAD 0xFFFFFFFF
  13. #define SYSTIMER_EN (1 << 7)
  14. #define SYSTIMER_32BIT (1 << 1)
  15. #define SYSTIMER_PRESC_16 (1 << 2)
  16. #define SYSTIMER_PRESC_256 (1 << 3)
  17. struct systimer {
  18. u32 timer0load; /* 0x00 */
  19. u32 timer0value;
  20. u32 timer0control;
  21. u32 timer0intclr;
  22. u32 timer0ris;
  23. u32 timer0mis;
  24. u32 timer0bgload;
  25. u32 timer1load; /* 0x20 */
  26. u32 timer1value;
  27. u32 timer1control;
  28. u32 timer1intclr;
  29. u32 timer1ris;
  30. u32 timer1mis;
  31. u32 timer1bgload;
  32. };
  33. #endif /* _SYSTIMER_H_ */