fsl_gtm.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Freescale General-purpose Timers Module
  3. *
  4. * Copyright 2006 Freescale Semiconductor, Inc.
  5. * Shlomi Gridish <gridish@freescale.com>
  6. * Jerry Huang <Chang-Ming.Huang@freescale.com>
  7. * Copyright (c) MontaVista Software, Inc. 2008.
  8. * Anton Vorontsov <avorontsov@ru.mvista.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. */
  15. #ifndef __ASM_FSL_GTM_H
  16. #define __ASM_FSL_GTM_H
  17. #include <linux/types.h>
  18. struct gtm;
  19. struct gtm_timer {
  20. unsigned int irq;
  21. struct gtm *gtm;
  22. bool requested;
  23. u8 __iomem *gtcfr;
  24. __be16 __iomem *gtmdr;
  25. __be16 __iomem *gtpsr;
  26. __be16 __iomem *gtcnr;
  27. __be16 __iomem *gtrfr;
  28. __be16 __iomem *gtevr;
  29. };
  30. extern struct gtm_timer *gtm_get_timer16(void);
  31. extern struct gtm_timer *gtm_get_specific_timer16(struct gtm *gtm,
  32. unsigned int timer);
  33. extern void gtm_put_timer16(struct gtm_timer *tmr);
  34. extern int gtm_set_timer16(struct gtm_timer *tmr, unsigned long usec,
  35. bool reload);
  36. extern int gtm_set_exact_timer16(struct gtm_timer *tmr, u16 usec,
  37. bool reload);
  38. extern void gtm_stop_timer16(struct gtm_timer *tmr);
  39. extern void gtm_ack_timer16(struct gtm_timer *tmr, u16 events);
  40. #endif /* __ASM_FSL_GTM_H */