realizationOfDataCalculation.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /*
  2. * arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
  3. *
  4. * Register definitions for IXP4xx chipset. This file contains
  5. * register location and bit definitions only. Platform specific
  6. * definitions and helper function declarations are in platform.h
  7. * and machine-name.h.
  8. *
  9. * Copyright (C) 2002 Intel Corporation.
  10. * Copyright (C) 2003-2004 MontaVista Software, Inc.
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2 as
  14. * published by the Free Software Foundation.
  15. *
  16. */
  17. #ifndef _ASM_ARM_IXP4XX_H_
  18. #define _ASM_ARM_IXP4XX_H_
  19. /*
  20. * IXP4xx Linux Memory Map:
  21. *
  22. * Phy Size Virt Description
  23. * =========================================================================
  24. *
  25. * 0x00000000 0x10000000(max) PAGE_OFFSET System RAM
  26. *
  27. * 0x48000000 0x04000000 ioremap'd PCI Memory Space
  28. *
  29. * 0x50000000 0x10000000 ioremap'd EXP BUS
  30. *
  31. * 0xC8000000 0x00013000 0xFEF00000 On-Chip Peripherals
  32. *
  33. * 0xC0000000 0x00001000 0xFEF13000 PCI CFG
  34. *
  35. * 0xC4000000 0x00001000 0xFEF14000 EXP CFG
  36. *
  37. * 0x60000000 0x00004000 0xFEF15000 QMgr
  38. */
  39. /*
  40. * Queue Manager
  41. */
  42. #define IXP4XX_QMGR_BASE_PHYS 0x60000000
  43. #define IXP4XX_QMGR_BASE_VIRT IOMEM(0xFEF15000)
  44. #define IXP4XX_QMGR_REGION_SIZE 0x00004000
  45. /*
  46. * Peripheral space, including debug UART. Must be section-aligned so that
  47. * it can be used with the low-level debug code.
  48. */
  49. #define IXP4XX_PERIPHERAL_BASE_PHYS 0xC8000000
  50. #define IXP4XX_PERIPHERAL_BASE_VIRT IOMEM(0xFEF00000)
  51. #define IXP4XX_PERIPHERAL_REGION_SIZE 0x00013000
  52. /*
  53. * PCI Config registers
  54. */
  55. #define IXP4XX_PCI_CFG_BASE_PHYS 0xC0000000
  56. #define IXP4XX_PCI_CFG_BASE_VIRT IOMEM(0xFEF13000)
  57. #define IXP4XX_PCI_CFG_REGION_SIZE 0x00001000
  58. /*
  59. * Expansion BUS Configuration registers
  60. */
  61. #define IXP4XX_EXP_CFG_BASE_PHYS 0xC4000000
  62. #define IXP4XX_EXP_CFG_BASE_VIRT 0xFEF14000
  63. #define IXP4XX_EXP_CFG_REGION_SIZE 0x00001000
  64. #define IXP4XX_EXP_CS0_OFFSET 0x00
  65. #define IXP4XX_EXP_CS1_OFFSET 0x04
  66. #define IXP4XX_EXP_CS2_OFFSET 0x08
  67. #define IXP4XX_EXP_CS3_OFFSET 0x0C
  68. #define IXP4XX_EXP_CS4_OFFSET 0x10
  69. #define IXP4XX_EXP_CS5_OFFSET 0x14
  70. #define IXP4XX_EXP_CS6_OFFSET 0x18
  71. #define IXP4XX_EXP_CS7_OFFSET 0x1C
  72. #define IXP4XX_EXP_CFG0_OFFSET 0x20
  73. #define IXP4XX_EXP_CFG1_OFFSET 0x24
  74. #define IXP4XX_EXP_CFG2_OFFSET 0x28
  75. #define IXP4XX_EXP_CFG3_OFFSET 0x2C
  76. /*
  77. * Expansion Bus Controller registers.
  78. */
  79. #define IXP4XX_EXP_REG(x) ((volatile u32 __iomem *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
  80. #define IXP4XX_EXP_CS0 IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET)
  81. #define IXP4XX_EXP_CS1 IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET)
  82. #define IXP4XX_EXP_CS2 IXP4XX_EXP_REG(IXP4XX_EXP_CS2_OFFSET)
  83. #define IXP4XX_EXP_CS3 IXP4XX_EXP_REG(IXP4XX_EXP_CS3_OFFSET)
  84. #define IXP4XX_EXP_CS4 IXP4XX_EXP_REG(IXP4XX_EXP_CS4_OFFSET)
  85. #define IXP4XX_EXP_CS5 IXP4XX_EXP_REG(IXP4XX_EXP_CS5_OFFSET)
  86. #define IXP4XX_EXP_CS6 IXP4XX_EXP_REG(IXP4XX_EXP_CS6_OFFSET)
  87. #define IXP4XX_EXP_CS7 IXP4XX_EXP_REG(IXP4XX_EXP_CS7_OFFSET)
  88. #define IXP4XX_EXP_CFG0 IXP4XX_EXP_REG(IXP4XX_EXP_CFG0_OFFSET)
  89. #define IXP4XX_EXP_CFG1 IXP4XX_EXP_REG(IXP4XX_EXP_CFG1_OFFSET)
  90. #define IXP4XX_EXP_CFG2 IXP4XX_EXP_REG(IXP4XX_EXP_CFG2_OFFSET)
  91. #define IXP4XX_EXP_CFG3 IXP4XX_EXP_REG(IXP4XX_EXP_CFG3_OFFSET)
  92. /*
  93. * Peripheral Space Register Region Base Addresses
  94. */
  95. #define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000)
  96. #define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000)
  97. #define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000)
  98. #define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
  99. #define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
  100. #define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
  101. #define IXP4XX_NPEA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
  102. #define IXP4XX_NPEB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
  103. #define IXP4XX_NPEC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
  104. #define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
  105. #define IXP4XX_EthC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
  106. #define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
  107. /* ixp46X only */
  108. #define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
  109. #define IXP4XX_EthB1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000)
  110. #define IXP4XX_EthB2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000)
  111. #define IXP4XX_EthB3_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000)
  112. #define IXP4XX_TIMESYNC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000)
  113. #define IXP4XX_I2C_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000)
  114. #define IXP4XX_SSP_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000)
  115. #define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
  116. #define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
  117. #define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
  118. #define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
  119. #define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
  120. #define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
  121. #define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000)
  122. #define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000)
  123. #define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000)
  124. #define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
  125. #define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
  126. #define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
  127. /* ixp46X only */
  128. #define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xC000)
  129. #define IXP4XX_EthB1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xD000)
  130. #define IXP4XX_EthB2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xE000)
  131. #define IXP4XX_EthB3_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xF000)
  132. #define IXP4XX_TIMESYNC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x10000)
  133. #define IXP4XX_I2C_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x11000)
  134. #define IXP4XX_SSP_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x12000)
  135. /*
  136. * Constants to make it easy to access Interrupt Controller registers
  137. */
  138. #define IXP4XX_ICPR_OFFSET 0x00 /* Interrupt Status */
  139. #define IXP4XX_ICMR_OFFSET 0x04 /* Interrupt Enable */
  140. #define IXP4XX_ICLR_OFFSET 0x08 /* Interrupt IRQ/FIQ Select */
  141. #define IXP4XX_ICIP_OFFSET 0x0C /* IRQ Status */
  142. #define IXP4XX_ICFP_OFFSET 0x10 /* FIQ Status */
  143. #define IXP4XX_ICHR_OFFSET 0x14 /* Interrupt Priority */
  144. #define IXP4XX_ICIH_OFFSET 0x18 /* IRQ Highest Pri Int */
  145. #define IXP4XX_ICFH_OFFSET 0x1C /* FIQ Highest Pri Int */
  146. /*
  147. * IXP465-only
  148. */
  149. #define IXP4XX_ICPR2_OFFSET 0x20 /* Interrupt Status 2 */
  150. #define IXP4XX_ICMR2_OFFSET 0x24 /* Interrupt Enable 2 */
  151. #define IXP4XX_ICLR2_OFFSET 0x28 /* Interrupt IRQ/FIQ Select 2 */
  152. #define IXP4XX_ICIP2_OFFSET 0x2C /* IRQ Status */
  153. #define IXP4XX_ICFP2_OFFSET 0x30 /* FIQ Status */
  154. #define IXP4XX_ICEEN_OFFSET 0x34 /* Error High Pri Enable */
  155. /*
  156. * Interrupt Controller Register Definitions.
  157. */
  158. #define IXP4XX_INTC_REG(x) ((volatile u32 *)(IXP4XX_INTC_BASE_VIRT+(x)))
  159. #define IXP4XX_ICPR IXP4XX_INTC_REG(IXP4XX_ICPR_OFFSET)
  160. #define IXP4XX_ICMR IXP4XX_INTC_REG(IXP4XX_ICMR_OFFSET)
  161. #define IXP4XX_ICLR IXP4XX_INTC_REG(IXP4XX_ICLR_OFFSET)
  162. #define IXP4XX_ICIP IXP4XX_INTC_REG(IXP4XX_ICIP_OFFSET)
  163. #define IXP4XX_ICFP IXP4XX_INTC_REG(IXP4XX_ICFP_OFFSET)
  164. #define IXP4XX_ICHR IXP4XX_INTC_REG(IXP4XX_ICHR_OFFSET)
  165. #define IXP4XX_ICIH IXP4XX_INTC_REG(IXP4XX_ICIH_OFFSET)
  166. #define IXP4XX_ICFH IXP4XX_INTC_REG(IXP4XX_ICFH_OFFSET)
  167. #define IXP4XX_ICPR2 IXP4XX_INTC_REG(IXP4XX_ICPR2_OFFSET)
  168. #define IXP4XX_ICMR2 IXP4XX_INTC_REG(IXP4XX_ICMR2_OFFSET)
  169. #define IXP4XX_ICLR2 IXP4XX_INTC_REG(IXP4XX_ICLR2_OFFSET)
  170. #define IXP4XX_ICIP2 IXP4XX_INTC_REG(IXP4XX_ICIP2_OFFSET)
  171. #define IXP4XX_ICFP2 IXP4XX_INTC_REG(IXP4XX_ICFP2_OFFSET)
  172. #define IXP4XX_ICEEN IXP4XX_INTC_REG(IXP4XX_ICEEN_OFFSET)
  173. /*
  174. * Constants to make it easy to access GPIO registers
  175. */
  176. #define IXP4XX_GPIO_GPOUTR_OFFSET 0x00
  177. #define IXP4XX_GPIO_GPOER_OFFSET 0x04
  178. #define IXP4XX_GPIO_GPINR_OFFSET 0x08
  179. #define IXP4XX_GPIO_GPISR_OFFSET 0x0C
  180. #define IXP4XX_GPIO_GPIT1R_OFFSET 0x10
  181. #define IXP4XX_GPIO_GPIT2R_OFFSET 0x14
  182. #define IXP4XX_GPIO_GPCLKR_OFFSET 0x18
  183. #define IXP4XX_GPIO_GPDBSELR_OFFSET 0x1C
  184. /*
  185. * GPIO Register Definitions.
  186. * [Only perform 32bit reads/writes]
  187. */
  188. #define IXP4XX_GPIO_REG(x) ((volatile u32 *)(IXP4XX_GPIO_BASE_VIRT+(x)))
  189. #define IXP4XX_GPIO_GPOUTR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOUTR_OFFSET)
  190. #define IXP4XX_GPIO_GPOER IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOER_OFFSET)
  191. #define IXP4XX_GPIO_GPINR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPINR_OFFSET)
  192. #define IXP4XX_GPIO_GPISR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPISR_OFFSET)
  193. #define IXP4XX_GPIO_GPIT1R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT1R_OFFSET)
  194. #define IXP4XX_GPIO_GPIT2R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT2R_OFFSET)
  195. #define IXP4XX_GPIO_GPCLKR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPCLKR_OFFSET)
  196. #define IXP4XX_GPIO_GPDBSELR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPDBSELR_OFFSET)
  197. /*
  198. * GPIO register bit definitions
  199. */
  200. /* Interrupt styles
  201. */