systimer.h 777 B

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