sh_tmu.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (C) 2012 Renesas Solutions Corp.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __SH_TMU_H
  23. #define __SH_TMU_H
  24. #include <asm/types.h>
  25. #if defined(CONFIG_CPU_SH3)
  26. struct tmu_regs {
  27. u8 tocr;
  28. u8 reserved0;
  29. u8 tstr;
  30. u8 reserved1;
  31. u32 tcor0;
  32. u32 tcnt0;
  33. u16 tcr0;
  34. u16 reserved2;
  35. u32 tcor1;
  36. u32 tcnt1;
  37. u16 tcr1;
  38. u16 reserved3;
  39. u32 tcor2;
  40. u32 tcnt2;
  41. u16 tcr2;
  42. u16 reserved4;
  43. u32 tcpr2;
  44. };
  45. #endif /* CONFIG_CPU_SH3 */
  46. #if defined(CONFIG_CPU_SH4) || defined(CONFIG_ARCH_RMOBILE)
  47. struct tmu_regs {
  48. u32 reserved;
  49. u8 tstr;
  50. u8 reserved2[3];
  51. u32 tcor0;
  52. u32 tcnt0;
  53. u16 tcr0;
  54. u16 reserved3;
  55. u32 tcor1;
  56. u32 tcnt1;
  57. u16 tcr1;
  58. u16 reserved4;
  59. u32 tcor2;
  60. u32 tcnt2;
  61. u16 tcr2;
  62. u16 reserved5;
  63. };
  64. #endif /* CONFIG_CPU_SH4 */
  65. static inline unsigned long get_tmu0_clk_rate(void)
  66. {
  67. return CONFIG_SH_TMU_CLK_FREQ;
  68. }
  69. #endif /* __SH_TMU_H */