hardware.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /*
  2. * Hardware definitions for TI OMAP processors and boards
  3. *
  4. * NOTE: Please put device driver specific defines into a separate header
  5. * file for each driver.
  6. *
  7. * Copyright (C) 2001 RidgeRun, Inc.
  8. * Author: RidgeRun, Inc. Greg Lonnon <[email protected]>
  9. *
  10. * Reorganized for Linux-2.6 by Tony Lindgren <[email protected]>
  11. * and Dirk Behme <[email protected]>
  12. *
  13. * This program is free software; you can redistribute it and/or modify it
  14. * under the terms of the GNU General Public License as published by the
  15. * Free Software Foundation; either version 2 of the License, or (at your
  16. * option) any later version.
  17. *
  18. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  19. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  20. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  21. * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  23. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  24. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  25. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *
  29. * You should have received a copy of the GNU General Public License along
  30. * with this program; if not, write to the Free Software Foundation, Inc.,
  31. * 675 Mass Ave, Cambridge, MA 02139, USA.
  32. */
  33. #ifndef __ASM_ARCH_OMAP_HARDWARE_H
  34. #define __ASM_ARCH_OMAP_HARDWARE_H
  35. #include <linux/sizes.h>
  36. #include <linux/soc/ti/omap1-io.h>
  37. #ifndef __ASSEMBLER__
  38. #include <asm/types.h>
  39. #include <linux/soc/ti/omap1-soc.h>
  40. #include "tc.h"
  41. /* Almost all documentation for chip and board memory maps assumes
  42. * BM is clear. Most devel boards have a switch to control booting
  43. * from NOR flash (using external chipselect 3) rather than mask ROM,
  44. * which uses BM to interchange the physical CS0 and CS3 addresses.
  45. */
  46. static inline u32 omap_cs0m_phys(void)
  47. {
  48. return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
  49. ? OMAP_CS3_PHYS : 0;
  50. }
  51. static inline u32 omap_cs3_phys(void)
  52. {
  53. return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
  54. ? 0 : OMAP_CS3_PHYS;
  55. }
  56. #endif /* ifndef __ASSEMBLER__ */
  57. #define OMAP1_IO_OFFSET 0x00f00000 /* Virtual IO = 0xff0b0000 */
  58. #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET)
  59. #include "serial.h"
  60. /*
  61. * ---------------------------------------------------------------------------
  62. * Common definitions for all OMAP processors
  63. * NOTE: Put all processor or board specific parts to the special header
  64. * files.
  65. * ---------------------------------------------------------------------------
  66. */
  67. /*
  68. * ----------------------------------------------------------------------------
  69. * Timers
  70. * ----------------------------------------------------------------------------
  71. */
  72. #define OMAP_MPU_TIMER1_BASE (0xfffec500)
  73. #define OMAP_MPU_TIMER2_BASE (0xfffec600)
  74. #define OMAP_MPU_TIMER3_BASE (0xfffec700)
  75. #define MPU_TIMER_FREE (1 << 6)
  76. #define MPU_TIMER_CLOCK_ENABLE (1 << 5)
  77. #define MPU_TIMER_AR (1 << 1)
  78. #define MPU_TIMER_ST (1 << 0)
  79. /*
  80. * ---------------------------------------------------------------------------
  81. * Watchdog timer
  82. * ---------------------------------------------------------------------------
  83. */
  84. /* Watchdog timer within the OMAP3.2 gigacell */
  85. #define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
  86. #define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
  87. #define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
  88. #define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
  89. #define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
  90. /*
  91. * ---------------------------------------------------------------------------
  92. * Interrupts
  93. * ---------------------------------------------------------------------------
  94. */
  95. #ifdef CONFIG_ARCH_OMAP1
  96. /*
  97. * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
  98. * or something similar.. -- PFM.
  99. */
  100. #define OMAP_IH1_BASE 0xfffecb00
  101. #define OMAP_IH2_BASE 0xfffe0000
  102. #define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
  103. #define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
  104. #define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
  105. #define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
  106. #define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
  107. #define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
  108. #define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
  109. #define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
  110. #define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
  111. #define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
  112. #define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
  113. #define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
  114. #define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
  115. #define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
  116. #define IRQ_ITR_REG_OFFSET 0x00
  117. #define IRQ_MIR_REG_OFFSET 0x04
  118. #define IRQ_SIR_IRQ_REG_OFFSET 0x10
  119. #define IRQ_SIR_FIQ_REG_OFFSET 0x14
  120. #define IRQ_CONTROL_REG_OFFSET 0x18
  121. #define IRQ_ISR_REG_OFFSET 0x9c
  122. #define IRQ_ILR0_REG_OFFSET 0x1c
  123. #define IRQ_GMR_REG_OFFSET 0xa0
  124. #endif
  125. /* Timer32K for 1610 and 1710*/
  126. #define OMAP_TIMER32K_BASE 0xFFFBC400
  127. /*
  128. * ---------------------------------------------------------------------------
  129. * TIPB bus interface
  130. * ---------------------------------------------------------------------------
  131. */
  132. #define TIPB_PUBLIC_CNTL_BASE 0xfffed300
  133. #define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
  134. #define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
  135. #define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
  136. /*
  137. * ----------------------------------------------------------------------------
  138. * MPUI interface
  139. * ----------------------------------------------------------------------------
  140. */
  141. #define MPUI_BASE (0xfffec900)
  142. #define MPUI_CTRL (MPUI_BASE + 0x0)
  143. #define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
  144. #define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
  145. #define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
  146. #define MPUI_STATUS_REG (MPUI_BASE + 0x10)
  147. #define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
  148. #define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
  149. #define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
  150. /*
  151. * ----------------------------------------------------------------------------
  152. * LED Pulse Generator
  153. * ----------------------------------------------------------------------------
  154. */
  155. #define OMAP_LPG1_BASE 0xfffbd000
  156. #define OMAP_LPG2_BASE 0xfffbd800
  157. #define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
  158. #define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
  159. #define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
  160. #define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
  161. /*
  162. * ---------------------------------------------------------------------------
  163. * Processor specific defines
  164. * ---------------------------------------------------------------------------
  165. */
  166. #include "omap7xx.h"
  167. #include "omap1510.h"
  168. #include "omap16xx.h"
  169. #endif /* __ASM_ARCH_OMAP_HARDWARE_H */