ixp2000-regs.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. /*
  2. * include/asm-arm/arch-ixp2000/ixp2000-regs.h
  3. *
  4. * Chipset register definitions for IXP2400/2800 based systems.
  5. *
  6. * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
  7. *
  8. * Maintainer: Deepak Saxena <dsaxena@plexity.net>
  9. *
  10. * Copyright (C) 2002 Intel Corp.
  11. * Copyright (C) 2003-2004 MontaVista Software, Inc.
  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. #ifndef _IXP2000_REGS_H_
  19. #define _IXP2000_REGS_H_
  20. /*
  21. * IXP2000 linux memory map:
  22. *
  23. * virt phys size
  24. * fb000000 db000000 16M PCI CFG1
  25. * fc000000 da000000 16M PCI CFG0
  26. * fd000000 d8000000 16M PCI I/O
  27. * fe[0-7]00000 8M per-platform mappings
  28. * feb00000 c8000000 1M MSF
  29. * fec00000 df000000 1M PCI CSRs
  30. * fed00000 de000000 1M PCI CREG
  31. * fee00000 d6000000 1M INTCTL
  32. * fef00000 c0000000 1M CAP
  33. */
  34. /*
  35. * Static I/O regions.
  36. *
  37. * Most of the registers are clumped in 4K regions spread throughout
  38. * the 0xc0000000 -> 0xc0100000 address range, but we just map in
  39. * the whole range using a single 1 MB section instead of small
  40. * 4K pages. This has two advantages for us:
  41. *
  42. * 1) We use only one TLB entry for large number of on-chip I/O devices.
  43. *
  44. * 2) We can easily set the Section attributes to XCB=101 on the IXP2400
  45. * as required per erratum #66. We accomplish this by using a
  46. * new MT_IXP2000_DEVICE memory type with the bits set as required.
  47. *
  48. * CAP stands for CSR Access Proxy.
  49. *
  50. * If you change the virtual address of this mapping, please propagate
  51. * the change to arch/arm/kernel/debug.S, which hardcodes the virtual
  52. * address of the UART located in this region.
  53. */
  54. #define IXP2000_CAP_PHYS_BASE 0xc0000000
  55. #define IXP2000_CAP_VIRT_BASE 0xfef00000
  56. #define IXP2000_CAP_SIZE 0x00100000
  57. /*
  58. * Addresses for specific on-chip peripherals
  59. */
  60. #define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000
  61. #define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000
  62. #define IXP2000_UART_PHYS_BASE 0xc0030000
  63. #define IXP2000_UART_VIRT_BASE 0xfef30000
  64. #define IXP2000_TIMER_VIRT_BASE 0xfef20000
  65. #define IXP2000_GPIO_VIRT_BASE 0Xfef10000
  66. /*
  67. * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual
  68. * addresses of the INTCTL and PCI_CSR mappings are hardcoded in
  69. * entry-macro.S, so if you ever change these please propagate
  70. * the change.
  71. */
  72. #define IXP2000_INTCTL_PHYS_BASE 0xd6000000
  73. #define IXP2000_INTCTL_VIRT_BASE 0xfee00000
  74. #define IXP2000_INTCTL_SIZE 0x00100000
  75. #define IXP2000_PCI_CREG_PHYS_BASE 0xde000000
  76. #define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000
  77. #define IXP2000_PCI_CREG_SIZE 0x00100000
  78. #define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000
  79. #define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
  80. #define IXP2000_PCI_CSR_SIZE 0x00100000
  81. #define IXP2000_MSF_PHYS_BASE 0xc8000000
  82. #define IXP2000_MSF_VIRT_BASE 0xfeb00000
  83. #define IXP2000_MSF_SIZE 0x00100000
  84. #define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
  85. #define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
  86. #define IXP2000_PCI_IO_SIZE 0x01000000
  87. #define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000
  88. #define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000
  89. #define IXP2000_PCI_CFG0_SIZE 0x01000000
  90. #define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000
  91. #define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000
  92. #define IXP2000_PCI_CFG1_SIZE 0x01000000
  93. /*
  94. * Timers
  95. */
  96. #define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x)))
  97. /* Timer control */
  98. #define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00)
  99. #define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04)
  100. #define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08)
  101. #define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c)
  102. /* Store initial value */
  103. #define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10)
  104. #define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14)
  105. #define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18)
  106. #define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c)
  107. /* Read current value */
  108. #define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20)
  109. #define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24)
  110. #define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28)
  111. #define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c)
  112. /* Clear associated timer interrupt */
  113. #define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30)
  114. #define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34)
  115. #define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38)
  116. #define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c)
  117. /* Timer watchdog enable for T4 */
  118. #define IXP2000_TWDE IXP2000_TIMER_REG(0x40)
  119. #define WDT_ENABLE 0x00000001
  120. #define TIMER_DIVIDER_256 0x00000008
  121. #define TIMER_ENABLE 0x00000080
  122. #define IRQ_MASK_TIMER1 (1 << 4)
  123. /*
  124. * Interrupt controller registers
  125. */
  126. #define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x))
  127. #define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08)
  128. #define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10)
  129. #define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10)
  130. #define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18)
  131. #define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14)
  132. #define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24)
  133. #define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c)
  134. #define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30)
  135. #define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34)
  136. #define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60)
  137. #define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64)
  138. #define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68)
  139. #define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c)
  140. #define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80)
  141. #define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
  142. #define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
  143. #define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
  144. #define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
  145. #define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
  146. #define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
  147. #define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c)
  148. #define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180)
  149. #define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184)
  150. #define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188)
  151. #define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c)
  152. #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0)
  153. #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4)
  154. #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8)
  155. #define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec)
  156. #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200)
  157. #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204)
  158. #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208)
  159. #define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c)
  160. /*
  161. * Mask of valid IRQs in the 32-bit IRQ register. We use
  162. * this to mark certain IRQs as being invalid.
  163. */
  164. #define IXP2000_VALID_IRQ_MASK 0x0f0fffff
  165. /*
  166. * PCI config register access from core
  167. */
  168. #define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x))
  169. #define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04)
  170. #define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10)
  171. #define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14)
  172. #define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18)
  173. /*
  174. * PCI CSRs
  175. */
  176. #define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x))
  177. /*
  178. * PCI outbound interrupts
  179. */
  180. #define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30)
  181. #define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34)
  182. /*
  183. * PCI communications
  184. */
  185. #define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50)
  186. #define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54)
  187. #define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58)
  188. #define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C)
  189. #define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60)
  190. #define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64)
  191. #define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70)
  192. #define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74)
  193. /*
  194. * DMA engines
  195. */
  196. #define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80)
  197. #define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84)
  198. #define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88)
  199. #define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C)
  200. #define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90)
  201. #define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94)
  202. #define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0)
  203. #define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4)
  204. #define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8)
  205. #define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC)
  206. #define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0)
  207. #define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4)
  208. #define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0)
  209. #define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4)
  210. #define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8)
  211. #define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC)
  212. #define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0)
  213. #define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4)
  214. #define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0)
  215. /*
  216. * Size masks for BARs
  217. */
  218. #define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC)
  219. #define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100)
  220. /*
  221. * Control and uEngine related
  222. */
  223. #define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C)
  224. #define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140)
  225. #define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148)
  226. #define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C)
  227. #define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150)
  228. #define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154)
  229. /*
  230. * Inbound PCI interrupt control
  231. */
  232. #define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158)
  233. #define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C)
  234. #define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */
  235. #define IXP2000_PCICNTL_PCF (1<<28) /* PCI Centrolfunction bit */
  236. #define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */
  237. /* These are from the IRQ register in the PCI ISR register */
  238. #define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */
  239. #define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
  240. #define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
  241. #define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
  242. #define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
  243. #define IXP2000_PCI_RST_REL (1 << 2)
  244. #define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
  245. #define CFG_PCI_BOOT_HOST (1 << 2)
  246. #define CFG_BOOT_PROM (1 << 1)
  247. /*
  248. * SlowPort CSRs
  249. *
  250. * The slowport is used to access things like flash, SONET framer control
  251. * ports, slave microprocessors, CPLDs, and others of chip memory mapped
  252. * peripherals.
  253. */
  254. #define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x))
  255. #define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00)
  256. #define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04)
  257. #define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08)
  258. #define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c)
  259. #define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10)
  260. #define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14)
  261. #define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18)
  262. #define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C)
  263. #define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20)
  264. #define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24)
  265. #define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28)
  266. /*
  267. * CCR values.
  268. * The CCR configures the clock division for the slowport interface.
  269. */
  270. #define SLOWPORT_CCR_DIV_1 0x00
  271. #define SLOWPORT_CCR_DIV_2 0x01
  272. #define SLOWPORT_CCR_DIV_4 0x02
  273. #define SLOWPORT_CCR_DIV_6 0x03
  274. #define SLOWPORT_CCR_DIV_8 0x04
  275. #define SLOWPORT_CCR_DIV_10 0x05
  276. #define SLOWPORT_CCR_DIV_12 0x06
  277. #define SLOWPORT_CCR_DIV_14 0x07
  278. #define SLOWPORT_CCR_DIV_16 0x08
  279. #define SLOWPORT_CCR_DIV_18 0x09
  280. #define SLOWPORT_CCR_DIV_20 0x0a
  281. #define SLOWPORT_CCR_DIV_22 0x0b
  282. #define SLOWPORT_CCR_DIV_24 0x0c
  283. #define SLOWPORT_CCR_DIV_26 0x0d
  284. #define SLOWPORT_CCR_DIV_28 0x0e
  285. #define SLOWPORT_CCR_DIV_30 0x0f
  286. /*
  287. * PCR values. PCR configure the mode of the interface.
  288. */
  289. #define SLOWPORT_MODE_FLASH 0x00
  290. #define SLOWPORT_MODE_LUCENT 0x01
  291. #define SLOWPORT_MODE_PMC_SIERRA 0x02
  292. #define SLOWPORT_MODE_INTEL_UP 0x03
  293. #define SLOWPORT_MODE_MOTOROLA_UP 0x04
  294. /*
  295. * ADC values. Defines data and address bus widths.
  296. */
  297. #define SLOWPORT_ADDR_WIDTH_8 0x00
  298. #define SLOWPORT_ADDR_WIDTH_16 0x01
  299. #define SLOWPORT_ADDR_WIDTH_24 0x02
  300. #define SLOWPORT_ADDR_WIDTH_32 0x03
  301. #define SLOWPORT_DATA_WIDTH_8 0x00
  302. #define SLOWPORT_DATA_WIDTH_16 0x10
  303. #define SLOWPORT_DATA_WIDTH_24 0x20
  304. #define SLOWPORT_DATA_WIDTH_32 0x30
  305. /*
  306. * Masks and shifts for various fields in the WTC and RTC registers.
  307. */
  308. #define SLOWPORT_WRTC_MASK_HD 0x0003
  309. #define SLOWPORT_WRTC_MASK_SU 0x003c
  310. #define SLOWPORT_WRTC_MASK_PW 0x03c0
  311. #define SLOWPORT_WRTC_SHIFT_HD 0x00
  312. #define SLOWPORT_WRTC_SHIFT_SU 0x02
  313. #define SLOWPORT_WRTC_SHFIT_PW 0x06
  314. /*
  315. * GPIO registers & GPIO interface.
  316. */
  317. #define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x)))
  318. #define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00)
  319. #define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04)
  320. #define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08)
  321. #define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c)
  322. #define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10)
  323. #define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14)
  324. #define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18)
  325. #define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c)
  326. #define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20)
  327. #define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24)
  328. #define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28)
  329. #define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c)
  330. #define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30)
  331. #define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34)
  332. #define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38)
  333. #define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c)
  334. #define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40)
  335. /*
  336. * "Global" registers...whatever that's supposed to mean.
  337. */
  338. #define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00)
  339. #define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x))
  340. #define IXP2000_PROD_ID GLOBAL_REG(0x00)
  341. #define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000
  342. #define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000
  343. #define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00
  344. #define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200
  345. #define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100
  346. #define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000
  347. #define IXP2000_MAJ_REV_MASK 0x000000F0
  348. #define IXP2000_MIN_REV_MASK 0x0000000F
  349. #define IXP2000_PROD_ID_MASK 0xFFFFFFFF
  350. #define IXP2000_PRODUCT_ID GLOBAL_REG(0x00)
  351. #define IXP2000_MISC_CONTROL GLOBAL_REG(0x04)
  352. #define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08)
  353. #define IXP2000_RESET0 GLOBAL_REG(0x0c)
  354. #define IXP2000_RESET1 GLOBAL_REG(0x10)
  355. #define IXP2000_CCR GLOBAL_REG(0x14)
  356. #define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18)
  357. #define RSTALL (1 << 16)
  358. #define WDT_RESET_ENABLE 0x01000000
  359. #endif /* _IXP2000_H_ */