cpu.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * (C) Copyright 2006-2010
  3. * Texas Instruments, <www.ti.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. *
  23. */
  24. #ifndef _CPU_H
  25. #define _CPU_H
  26. #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
  27. #include <asm/types.h>
  28. #endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
  29. #ifndef __KERNEL_STRICT_NAMES
  30. #ifndef __ASSEMBLY__
  31. struct gptimer {
  32. u32 tidr; /* 0x00 r */
  33. u8 res[0xc];
  34. u32 tiocp_cfg; /* 0x10 rw */
  35. u32 tistat; /* 0x14 r */
  36. u32 tisr; /* 0x18 rw */
  37. u32 tier; /* 0x1c rw */
  38. u32 twer; /* 0x20 rw */
  39. u32 tclr; /* 0x24 rw */
  40. u32 tcrr; /* 0x28 rw */
  41. u32 tldr; /* 0x2c rw */
  42. u32 ttgr; /* 0x30 rw */
  43. u32 twpc; /* 0x34 r */
  44. u32 tmar; /* 0x38 rw */
  45. u32 tcar1; /* 0x3c r */
  46. u32 tcicr; /* 0x40 rw */
  47. u32 tcar2; /* 0x44 r */
  48. };
  49. #endif /* __ASSEMBLY__ */
  50. #endif /* __KERNEL_STRICT_NAMES */
  51. /* enable sys_clk NO-prescale /1 */
  52. #define GPT_EN ((0x0 << 2) | (0x1 << 1) | (0x1 << 0))
  53. /* Watchdog */
  54. #ifndef __KERNEL_STRICT_NAMES
  55. #ifndef __ASSEMBLY__
  56. struct watchdog {
  57. u8 res1[0x34];
  58. u32 wwps; /* 0x34 r */
  59. u8 res2[0x10];
  60. u32 wspr; /* 0x48 rw */
  61. };
  62. #endif /* __ASSEMBLY__ */
  63. #endif /* __KERNEL_STRICT_NAMES */
  64. #define WD_UNLOCK1 0xAAAA
  65. #define WD_UNLOCK2 0x5555
  66. #define SYSCLKDIV_1 (0x1 << 6)
  67. #define SYSCLKDIV_2 (0x1 << 7)
  68. #define CLKSEL_GPT1 (0x1 << 0)
  69. #define EN_GPT1 (0x1 << 0)
  70. #define EN_32KSYNC (0x1 << 2)
  71. #define ST_WDT2 (0x1 << 5)
  72. #define RESETDONE (0x1 << 0)
  73. #define TCLR_ST (0x1 << 0)
  74. #define TCLR_AR (0x1 << 1)
  75. #define TCLR_PRE (0x1 << 5)
  76. /* I2C base */
  77. #define I2C_BASE1 (OMAP44XX_L4_PER_BASE + 0x70000)
  78. #define I2C_BASE2 (OMAP44XX_L4_PER_BASE + 0x72000)
  79. #define I2C_BASE3 (OMAP44XX_L4_PER_BASE + 0x60000)
  80. #endif /* _CPU_H */