cpu.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 gpmc_cs {
  32. u32 config1; /* 0x00 */
  33. u32 config2; /* 0x04 */
  34. u32 config3; /* 0x08 */
  35. u32 config4; /* 0x0C */
  36. u32 config5; /* 0x10 */
  37. u32 config6; /* 0x14 */
  38. u32 config7; /* 0x18 */
  39. u32 nand_cmd; /* 0x1C */
  40. u32 nand_adr; /* 0x20 */
  41. u32 nand_dat; /* 0x24 */
  42. u8 res[8]; /* blow up to 0x30 byte */
  43. };
  44. struct gpmc {
  45. u8 res1[0x10];
  46. u32 sysconfig; /* 0x10 */
  47. u8 res2[0x4];
  48. u32 irqstatus; /* 0x18 */
  49. u32 irqenable; /* 0x1C */
  50. u8 res3[0x20];
  51. u32 timeout_control; /* 0x40 */
  52. u8 res4[0xC];
  53. u32 config; /* 0x50 */
  54. u32 status; /* 0x54 */
  55. u8 res5[0x8]; /* 0x58 */
  56. struct gpmc_cs cs[8]; /* 0x60, 0x90, .. */
  57. u8 res6[0x14]; /* 0x1E0 */
  58. u32 ecc_config; /* 0x1F4 */
  59. u32 ecc_control; /* 0x1F8 */
  60. u32 ecc_size_config; /* 0x1FC */
  61. u32 ecc1_result; /* 0x200 */
  62. u32 ecc2_result; /* 0x204 */
  63. u32 ecc3_result; /* 0x208 */
  64. u32 ecc4_result; /* 0x20C */
  65. u32 ecc5_result; /* 0x210 */
  66. u32 ecc6_result; /* 0x214 */
  67. u32 ecc7_result; /* 0x218 */
  68. u32 ecc8_result; /* 0x21C */
  69. u32 ecc9_result; /* 0x220 */
  70. };
  71. /* Used for board specific gpmc initialization */
  72. extern struct gpmc *gpmc_cfg;
  73. struct gptimer {
  74. u32 tidr; /* 0x00 r */
  75. u8 res[0xc];
  76. u32 tiocp_cfg; /* 0x10 rw */
  77. u32 tistat; /* 0x14 r */
  78. u32 tisr; /* 0x18 rw */
  79. u32 tier; /* 0x1c rw */
  80. u32 twer; /* 0x20 rw */
  81. u32 tclr; /* 0x24 rw */
  82. u32 tcrr; /* 0x28 rw */
  83. u32 tldr; /* 0x2c rw */
  84. u32 ttgr; /* 0x30 rw */
  85. u32 twpc; /* 0x34 r */
  86. u32 tmar; /* 0x38 rw */
  87. u32 tcar1; /* 0x3c r */
  88. u32 tcicr; /* 0x40 rw */
  89. u32 tcar2; /* 0x44 r */
  90. };
  91. #endif /* __ASSEMBLY__ */
  92. #endif /* __KERNEL_STRICT_NAMES */
  93. /* enable sys_clk NO-prescale /1 */
  94. #define GPT_EN ((0x0 << 2) | (0x1 << 1) | (0x1 << 0))
  95. /* Watchdog */
  96. #ifndef __KERNEL_STRICT_NAMES
  97. #ifndef __ASSEMBLY__
  98. struct watchdog {
  99. u8 res1[0x34];
  100. u32 wwps; /* 0x34 r */
  101. u8 res2[0x10];
  102. u32 wspr; /* 0x48 rw */
  103. };
  104. #endif /* __ASSEMBLY__ */
  105. #endif /* __KERNEL_STRICT_NAMES */
  106. #define WD_UNLOCK1 0xAAAA
  107. #define WD_UNLOCK2 0x5555
  108. #define SYSCLKDIV_1 (0x1 << 6)
  109. #define SYSCLKDIV_2 (0x1 << 7)
  110. #define CLKSEL_GPT1 (0x1 << 0)
  111. #define EN_GPT1 (0x1 << 0)
  112. #define EN_32KSYNC (0x1 << 2)
  113. #define ST_WDT2 (0x1 << 5)
  114. #define RESETDONE (0x1 << 0)
  115. #define TCLR_ST (0x1 << 0)
  116. #define TCLR_AR (0x1 << 1)
  117. #define TCLR_PRE (0x1 << 5)
  118. /* GPMC BASE */
  119. #define GPMC_BASE (OMAP44XX_GPMC_BASE)
  120. /* I2C base */
  121. #define I2C_BASE1 (OMAP44XX_L4_PER_BASE + 0x70000)
  122. #define I2C_BASE2 (OMAP44XX_L4_PER_BASE + 0x72000)
  123. #define I2C_BASE3 (OMAP44XX_L4_PER_BASE + 0x60000)
  124. /* MUSB base */
  125. #define MUSB_BASE (OMAP44XX_L4_CORE_BASE + 0xAB000)
  126. #endif /* _CPU_H */