radstone_ppc7d.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. /*
  2. * arch/ppc/platforms/radstone_ppc7d.h
  3. *
  4. * Board definitions for the Radstone PPC7D boards.
  5. *
  6. * Author: James Chapman <jchapman@katalix.com>
  7. *
  8. * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
  9. * Based on code done by - Mark A. Greer <mgreer@mvista.com>
  10. *
  11. * This program is free software; you can redistribute it and/or modify it
  12. * under the terms of the GNU General Public License as published by the
  13. * Free Software Foundation; either version 2 of the License, or (at your
  14. * option) any later version.
  15. */
  16. /*
  17. * The MV64360 has 2 PCI buses each with 1 window from the CPU bus to
  18. * PCI I/O space and 4 windows from the CPU bus to PCI MEM space.
  19. * We'll only use one PCI MEM window on each PCI bus.
  20. *
  21. * This is the CPU physical memory map (windows must be at least 1MB
  22. * and start on a boundary that is a multiple of the window size):
  23. *
  24. * 0xff800000-0xffffffff - Boot window
  25. * 0xff000000-0xff000fff - AFIX registers (DevCS2)
  26. * 0xfef00000-0xfef0ffff - Internal MV64x60 registers
  27. * 0xfef40000-0xfef7ffff - Internal SRAM
  28. * 0xfef00000-0xfef0ffff - MV64360 Registers
  29. * 0x70000000-0x7fffffff - soldered flash (DevCS3)
  30. * 0xe8000000-0xe9ffffff - PCI I/O
  31. * 0x80000000-0xbfffffff - PCI MEM
  32. */
  33. #ifndef __PPC_PLATFORMS_PPC7D_H
  34. #define __PPC_PLATFORMS_PPC7D_H
  35. #include <asm/ppcboot.h>
  36. /*****************************************************************************
  37. * CPU Physical Memory Map setup.
  38. *****************************************************************************/
  39. #define PPC7D_BOOT_WINDOW_BASE 0xff800000
  40. #define PPC7D_AFIX_REG_BASE 0xff000000
  41. #define PPC7D_INTERNAL_SRAM_BASE 0xfef40000
  42. #define PPC7D_FLASH_BASE 0x70000000
  43. #define PPC7D_BOOT_WINDOW_SIZE_ACTUAL 0x00800000 /* 8MB */
  44. #define PPC7D_FLASH_SIZE_ACTUAL 0x10000000 /* 256MB */
  45. #define PPC7D_BOOT_WINDOW_SIZE max(MV64360_WINDOW_SIZE_MIN, \
  46. PPC7D_BOOT_WINDOW_SIZE_ACTUAL)
  47. #define PPC7D_FLASH_SIZE max(MV64360_WINDOW_SIZE_MIN, \
  48. PPC7D_FLASH_SIZE_ACTUAL)
  49. #define PPC7D_AFIX_REG_SIZE max(MV64360_WINDOW_SIZE_MIN, 0xff)
  50. #define PPC7D_PCI0_MEM0_START_PROC_ADDR 0x80000000UL
  51. #define PPC7D_PCI0_MEM0_START_PCI_HI_ADDR 0x00000000UL
  52. #define PPC7D_PCI0_MEM0_START_PCI_LO_ADDR 0x80000000UL
  53. #define PPC7D_PCI0_MEM0_SIZE 0x20000000UL
  54. #define PPC7D_PCI0_MEM1_START_PROC_ADDR 0xe8010000UL
  55. #define PPC7D_PCI0_MEM1_START_PCI_HI_ADDR 0x00000000UL
  56. #define PPC7D_PCI0_MEM1_START_PCI_LO_ADDR 0x00000000UL
  57. #define PPC7D_PCI0_MEM1_SIZE 0x000f0000UL
  58. #define PPC7D_PCI0_IO_START_PROC_ADDR 0xe8000000UL
  59. #define PPC7D_PCI0_IO_START_PCI_ADDR 0x00000000UL
  60. #define PPC7D_PCI0_IO_SIZE 0x00010000UL
  61. #define PPC7D_PCI1_MEM0_START_PROC_ADDR 0xa0000000UL
  62. #define PPC7D_PCI1_MEM0_START_PCI_HI_ADDR 0x00000000UL
  63. #define PPC7D_PCI1_MEM0_START_PCI_LO_ADDR 0xa0000000UL
  64. #define PPC7D_PCI1_MEM0_SIZE 0x20000000UL
  65. #define PPC7D_PCI1_MEM1_START_PROC_ADDR 0xe9800000UL
  66. #define PPC7D_PCI1_MEM1_START_PCI_HI_ADDR 0x00000000UL
  67. #define PPC7D_PCI1_MEM1_START_PCI_LO_ADDR 0x00000000UL
  68. #define PPC7D_PCI1_MEM1_SIZE 0x00800000UL
  69. #define PPC7D_PCI1_IO_START_PROC_ADDR 0xe9000000UL
  70. #define PPC7D_PCI1_IO_START_PCI_ADDR 0x00000000UL
  71. #define PPC7D_PCI1_IO_SIZE 0x00010000UL
  72. #define PPC7D_DEFAULT_BAUD 9600
  73. #define PPC7D_MPSC_CLK_SRC 8 /* TCLK */
  74. #define PPC7D_MPSC_CLK_FREQ 133333333 /* 133.3333... MHz */
  75. #define PPC7D_ETH0_PHY_ADDR 8
  76. #define PPC7D_ETH1_PHY_ADDR 9
  77. #define PPC7D_ETH2_PHY_ADDR 0
  78. #define PPC7D_ETH_TX_QUEUE_SIZE 400
  79. #define PPC7D_ETH_RX_QUEUE_SIZE 400
  80. #define PPC7D_ETH_PORT_CONFIG_VALUE \
  81. MV64340_ETH_UNICAST_NORMAL_MODE | \
  82. MV64340_ETH_DEFAULT_RX_QUEUE_0 | \
  83. MV64340_ETH_DEFAULT_RX_ARP_QUEUE_0 | \
  84. MV64340_ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP | \
  85. MV64340_ETH_RECEIVE_BC_IF_IP | \
  86. MV64340_ETH_RECEIVE_BC_IF_ARP | \
  87. MV64340_ETH_CAPTURE_TCP_FRAMES_DIS | \
  88. MV64340_ETH_CAPTURE_UDP_FRAMES_DIS | \
  89. MV64340_ETH_DEFAULT_RX_TCP_QUEUE_0 | \
  90. MV64340_ETH_DEFAULT_RX_UDP_QUEUE_0 | \
  91. MV64340_ETH_DEFAULT_RX_BPDU_QUEUE_0
  92. #define PPC7D_ETH_PORT_CONFIG_EXTEND_VALUE \
  93. MV64340_ETH_SPAN_BPDU_PACKETS_AS_NORMAL | \
  94. MV64340_ETH_PARTITION_DISABLE
  95. #define GT_ETH_IPG_INT_RX(value) \
  96. ((value & 0x3fff) << 8)
  97. #define PPC7D_ETH_PORT_SDMA_CONFIG_VALUE \
  98. MV64340_ETH_RX_BURST_SIZE_4_64BIT | \
  99. GT_ETH_IPG_INT_RX(0) | \
  100. MV64340_ETH_TX_BURST_SIZE_4_64BIT
  101. #define PPC7D_ETH_PORT_SERIAL_CONTROL_VALUE \
  102. MV64340_ETH_ENABLE_AUTO_NEG_FOR_DUPLX | \
  103. MV64340_ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \
  104. MV64340_ETH_ADV_SYMMETRIC_FLOW_CTRL | \
  105. MV64340_ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX | \
  106. MV64340_ETH_FORCE_BP_MODE_NO_JAM | \
  107. (1 << 9) | \
  108. MV64340_ETH_DO_NOT_FORCE_LINK_FAIL | \
  109. MV64340_ETH_RETRANSMIT_16_ATTEMPTS | \
  110. MV64340_ETH_ENABLE_AUTO_NEG_SPEED_GMII | \
  111. MV64340_ETH_DTE_ADV_0 | \
  112. MV64340_ETH_DISABLE_AUTO_NEG_BYPASS | \
  113. MV64340_ETH_AUTO_NEG_NO_CHANGE | \
  114. MV64340_ETH_MAX_RX_PACKET_9700BYTE | \
  115. MV64340_ETH_CLR_EXT_LOOPBACK | \
  116. MV64340_ETH_SET_FULL_DUPLEX_MODE | \
  117. MV64340_ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX
  118. /*****************************************************************************
  119. * Serial defines.
  120. *****************************************************************************/
  121. #define PPC7D_SERIAL_0 0xe80003f8
  122. #define PPC7D_SERIAL_1 0xe80002f8
  123. #define RS_TABLE_SIZE 2
  124. /* Rate for the 1.8432 Mhz clock for the onboard serial chip */
  125. #define UART_CLK 1843200
  126. #define BASE_BAUD ( UART_CLK / 16 )
  127. #ifdef CONFIG_SERIAL_DETECT_IRQ
  128. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_AUTO_IRQ)
  129. #else
  130. #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF)
  131. #endif
  132. #define STD_SERIAL_PORT_DFNS \
  133. { 0, BASE_BAUD, PPC7D_SERIAL_0, 4, STD_COM_FLAGS, /* ttyS0 */ \
  134. iomem_base: (u8 *)PPC7D_SERIAL_0, \
  135. io_type: SERIAL_IO_MEM, }, \
  136. { 0, BASE_BAUD, PPC7D_SERIAL_1, 3, STD_COM_FLAGS, /* ttyS1 */ \
  137. iomem_base: (u8 *)PPC7D_SERIAL_1, \
  138. io_type: SERIAL_IO_MEM },
  139. #define SERIAL_PORT_DFNS \
  140. STD_SERIAL_PORT_DFNS
  141. /*****************************************************************************
  142. * CPLD defines.
  143. *
  144. * Register map:-
  145. *
  146. * 0000 to 000F South Bridge DMA 1 Control
  147. * 0020 and 0021 South Bridge Interrupt 1 Control
  148. * 0040 to 0043 South Bridge Counter Control
  149. * 0060 Keyboard
  150. * 0061 South Bridge NMI Status and Control
  151. * 0064 Keyboard
  152. * 0071 and 0072 RTC R/W
  153. * 0078 to 007B South Bridge BIOS Timer
  154. * 0080 to 0090 South Bridge DMA Pages
  155. * 00A0 and 00A1 South Bridge Interrupt 2 Control
  156. * 00C0 to 00DE South Bridge DMA 2 Control
  157. * 02E8 to 02EF COM6 R/W
  158. * 02F8 to 02FF South Bridge COM2 R/W
  159. * 03E8 to 03EF COM5 R/W
  160. * 03F8 to 03FF South Bridge COM1 R/W
  161. * 040A South Bridge DMA Scatter/Gather RO
  162. * 040B DMA 1 Extended Mode WO
  163. * 0410 to 043F South Bridge DMA Scatter/Gather
  164. * 0481 to 048B South Bridge DMA High Pages
  165. * 04D0 and 04D1 South Bridge Edge/Level Control
  166. * 04D6 DMA 2 Extended Mode WO
  167. * 0804 Memory Configuration RO
  168. * 0806 Memory Configuration Extend RO
  169. * 0808 SCSI Activity LED R/W
  170. * 080C Equipment Present 1 RO
  171. * 080E Equipment Present 2 RO
  172. * 0810 Equipment Present 3 RO
  173. * 0812 Equipment Present 4 RO
  174. * 0818 Key Lock RO
  175. * 0820 LEDS R/W
  176. * 0824 COMs R/W
  177. * 0826 RTS R/W
  178. * 0828 Reset R/W
  179. * 082C Watchdog Trig R/W
  180. * 082E Interrupt R/W
  181. * 0830 Interrupt Status RO
  182. * 0832 PCI configuration RO
  183. * 0854 Board Revision RO
  184. * 0858 Extended ID RO
  185. * 0864 ID Link RO
  186. * 0866 Motherboard Type RO
  187. * 0868 FLASH Write control RO
  188. * 086A Software FLASH write protect R/W
  189. * 086E FLASH Control R/W
  190. *****************************************************************************/
  191. #define PPC7D_CPLD_MEM_CONFIG 0x0804
  192. #define PPC7D_CPLD_MEM_CONFIG_EXTEND 0x0806
  193. #define PPC7D_CPLD_SCSI_ACTIVITY_LED 0x0808
  194. #define PPC7D_CPLD_EQUIPMENT_PRESENT_1 0x080C
  195. #define PPC7D_CPLD_EQUIPMENT_PRESENT_2 0x080E
  196. #define PPC7D_CPLD_EQUIPMENT_PRESENT_3 0x0810
  197. #define PPC7D_CPLD_EQUIPMENT_PRESENT_4 0x0812
  198. #define PPC7D_CPLD_KEY_LOCK 0x0818
  199. #define PPC7D_CPLD_LEDS 0x0820
  200. #define PPC7D_CPLD_COMS 0x0824
  201. #define PPC7D_CPLD_RTS 0x0826
  202. #define PPC7D_CPLD_RESET 0x0828
  203. #define PPC7D_CPLD_WATCHDOG_TRIG 0x082C
  204. #define PPC7D_CPLD_INTR 0x082E
  205. #define PPC7D_CPLD_INTR_STATUS 0x0830
  206. #define PPC7D_CPLD_PCI_CONFIG 0x0832
  207. #define PPC7D_CPLD_BOARD_REVISION 0x0854
  208. #define PPC7D_CPLD_EXTENDED_ID 0x0858
  209. #define PPC7D_CPLD_ID_LINK 0x0864
  210. #define PPC7D_CPLD_MOTHERBOARD_TYPE 0x0866
  211. #define PPC7D_CPLD_FLASH_WRITE_CNTL 0x0868
  212. #define PPC7D_CPLD_SW_FLASH_WRITE_PROTECT 0x086A
  213. #define PPC7D_CPLD_FLASH_CNTL 0x086E
  214. /* MEMORY_CONFIG_EXTEND */
  215. #define PPC7D_CPLD_SDRAM_BANK_NUM_MASK 0x02
  216. #define PPC7D_CPLD_SDRAM_BANK_SIZE_MASK 0xc0
  217. #define PPC7D_CPLD_SDRAM_BANK_SIZE_128M 0
  218. #define PPC7D_CPLD_SDRAM_BANK_SIZE_256M 0x40
  219. #define PPC7D_CPLD_SDRAM_BANK_SIZE_512M 0x80
  220. #define PPC7D_CPLD_SDRAM_BANK_SIZE_1G 0xc0
  221. #define PPC7D_CPLD_FLASH_DEV_SIZE_MASK 0x03
  222. #define PPC7D_CPLD_FLASH_BANK_NUM_MASK 0x0c
  223. #define PPC7D_CPLD_FLASH_DEV_SIZE_64M 0
  224. #define PPC7D_CPLD_FLASH_DEV_SIZE_32M 1
  225. #define PPC7D_CPLD_FLASH_DEV_SIZE_16M 3
  226. #define PPC7D_CPLD_FLASH_BANK_NUM_4 0x00
  227. #define PPC7D_CPLD_FLASH_BANK_NUM_3 0x04
  228. #define PPC7D_CPLD_FLASH_BANK_NUM_2 0x08
  229. #define PPC7D_CPLD_FLASH_BANK_NUM_1 0x0c
  230. /* SCSI_LED */
  231. #define PPC7D_CPLD_SCSI_ACTIVITY_LED_OFF 0
  232. #define PPC7D_CPLD_SCSI_ACTIVITY_LED_ON 1
  233. /* EQUIPMENT_PRESENT_1 */
  234. #define PPC7D_CPLD_EQPT_PRES_1_FITTED 0
  235. #define PPC7D_CPLD_EQPT_PRES_1_PMC2_MASK (0x80 >> 2)
  236. #define PPC7D_CPLD_EQPT_PRES_1_PMC1_MASK (0x80 >> 3)
  237. #define PPC7D_CPLD_EQPT_PRES_1_AFIX_MASK (0x80 >> 4)
  238. /* EQUIPMENT_PRESENT_2 */
  239. #define PPC7D_CPLD_EQPT_PRES_2_FITTED !0
  240. #define PPC7D_CPLD_EQPT_PRES_2_UNIVERSE_MASK (0x80 >> 0)
  241. #define PPC7D_CPLD_EQPT_PRES_2_COM36_MASK (0x80 >> 2)
  242. #define PPC7D_CPLD_EQPT_PRES_2_GIGE_MASK (0x80 >> 3)
  243. #define PPC7D_CPLD_EQPT_PRES_2_DUALGIGE_MASK (0x80 >> 4)
  244. /* EQUIPMENT_PRESENT_3 */
  245. #define PPC7D_CPLD_EQPT_PRES_3_PMC2_V_MASK (0x80 >> 3)
  246. #define PPC7D_CPLD_EQPT_PRES_3_PMC2_5V (0 >> 3)
  247. #define PPC7D_CPLD_EQPT_PRES_3_PMC2_3V (0x80 >> 3)
  248. #define PPC7D_CPLD_EQPT_PRES_3_PMC1_V_MASK (0x80 >> 4)
  249. #define PPC7D_CPLD_EQPT_PRES_3_PMC1_5V (0 >> 4)
  250. #define PPC7D_CPLD_EQPT_PRES_3_PMC1_3V (0x80 >> 4)
  251. #define PPC7D_CPLD_EQPT_PRES_3_PMC_POWER_MASK (0x80 >> 5)
  252. #define PPC7D_CPLD_EQPT_PRES_3_PMC_POWER_INTER (0 >> 5)
  253. #define PPC7D_CPLD_EQPT_PRES_3_PMC_POWER_VME (0x80 >> 5)
  254. /* EQUIPMENT_PRESENT_4 */
  255. #define PPC7D_CPLD_EQPT_PRES_4_LPT_MASK (0x80 >> 2)
  256. #define PPC7D_CPLD_EQPT_PRES_4_LPT_FITTED (0x80 >> 2)
  257. #define PPC7D_CPLD_EQPT_PRES_4_PS2_USB2_MASK (0xc0 >> 6)
  258. #define PPC7D_CPLD_EQPT_PRES_4_PS2_FITTED (0x40 >> 6)
  259. #define PPC7D_CPLD_EQPT_PRES_4_USB2_FITTED (0x80 >> 6)
  260. /* CPLD_LEDS */
  261. #define PPC7D_CPLD_LEDS_ON (!0)
  262. #define PPC7D_CPLD_LEDS_OFF (0)
  263. #define PPC7D_CPLD_LEDS_NVRAM_PAGE_MASK (0xc0 >> 2)
  264. #define PPC7D_CPLD_LEDS_DS201_MASK (0x80 >> 4)
  265. #define PPC7D_CPLD_LEDS_DS219_MASK (0x80 >> 5)
  266. #define PPC7D_CPLD_LEDS_DS220_MASK (0x80 >> 6)
  267. #define PPC7D_CPLD_LEDS_DS221_MASK (0x80 >> 7)
  268. /* CPLD_COMS */
  269. #define PPC7D_CPLD_COMS_COM3_TCLKEN (0x80 >> 0)
  270. #define PPC7D_CPLD_COMS_COM3_RTCLKEN (0x80 >> 1)
  271. #define PPC7D_CPLD_COMS_COM3_MODE_MASK (0x80 >> 2)
  272. #define PPC7D_CPLD_COMS_COM3_MODE_RS232 (0)
  273. #define PPC7D_CPLD_COMS_COM3_MODE_RS422 (0x80 >> 2)
  274. #define PPC7D_CPLD_COMS_COM3_TXEN (0x80 >> 3)
  275. #define PPC7D_CPLD_COMS_COM4_TCLKEN (0x80 >> 4)
  276. #define PPC7D_CPLD_COMS_COM4_RTCLKEN (0x80 >> 5)
  277. #define PPC7D_CPLD_COMS_COM4_MODE_MASK (0x80 >> 6)
  278. #define PPC7D_CPLD_COMS_COM4_MODE_RS232 (0)
  279. #define PPC7D_CPLD_COMS_COM4_MODE_RS422 (0x80 >> 6)
  280. #define PPC7D_CPLD_COMS_COM4_TXEN (0x80 >> 7)
  281. /* CPLD_RTS */
  282. #define PPC7D_CPLD_RTS_COM36_LOOPBACK (0x80 >> 0)
  283. #define PPC7D_CPLD_RTS_COM4_SCLK (0x80 >> 1)
  284. #define PPC7D_CPLD_RTS_COM3_TXFUNC_MASK (0xc0 >> 2)
  285. #define PPC7D_CPLD_RTS_COM3_TXFUNC_DISABLED (0 >> 2)
  286. #define PPC7D_CPLD_RTS_COM3_TXFUNC_ENABLED (0x80 >> 2)
  287. #define PPC7D_CPLD_RTS_COM3_TXFUNC_ENABLED_RTG3 (0xc0 >> 2)
  288. #define PPC7D_CPLD_RTS_COM3_TXFUNC_ENABLED_RTG3S (0xc0 >> 2)
  289. #define PPC7D_CPLD_RTS_COM56_MODE_MASK (0x80 >> 4)
  290. #define PPC7D_CPLD_RTS_COM56_MODE_RS232 (0)
  291. #define PPC7D_CPLD_RTS_COM56_MODE_RS422 (0x80 >> 4)
  292. #define PPC7D_CPLD_RTS_COM56_ENABLE_MASK (0x80 >> 5)
  293. #define PPC7D_CPLD_RTS_COM56_DISABLED (0)
  294. #define PPC7D_CPLD_RTS_COM56_ENABLED (0x80 >> 5)
  295. #define PPC7D_CPLD_RTS_COM4_TXFUNC_MASK (0xc0 >> 6)
  296. #define PPC7D_CPLD_RTS_COM4_TXFUNC_DISABLED (0 >> 6)
  297. #define PPC7D_CPLD_RTS_COM4_TXFUNC_ENABLED (0x80 >> 6)
  298. #define PPC7D_CPLD_RTS_COM4_TXFUNC_ENABLED_RTG3 (0x40 >> 6)
  299. #define PPC7D_CPLD_RTS_COM4_TXFUNC_ENABLED_RTG3S (0x40 >> 6)
  300. /* WATCHDOG_TRIG */
  301. #define PPC7D_CPLD_WDOG_CAUSE_MASK (0x80 >> 0)
  302. #define PPC7D_CPLD_WDOG_CAUSE_NORMAL_RESET (0 >> 0)
  303. #define PPC7D_CPLD_WDOG_CAUSE_WATCHDOG (0x80 >> 0)
  304. #define PPC7D_CPLD_WDOG_ENABLE_MASK (0x80 >> 6)
  305. #define PPC7D_CPLD_WDOG_ENABLE_OFF (0 >> 6)
  306. #define PPC7D_CPLD_WDOG_ENABLE_ON (0x80 >> 6)
  307. #define PPC7D_CPLD_WDOG_RESETSW_MASK (0x80 >> 7)
  308. #define PPC7D_CPLD_WDOG_RESETSW_OFF (0 >> 7)
  309. #define PPC7D_CPLD_WDOG_RESETSW_ON (0x80 >> 7)
  310. /* Interrupt mask and status bits */
  311. #define PPC7D_CPLD_INTR_TEMP_MASK (0x80 >> 0)
  312. #define PPC7D_CPLD_INTR_HB8_MASK (0x80 >> 1)
  313. #define PPC7D_CPLD_INTR_PHY1_MASK (0x80 >> 2)
  314. #define PPC7D_CPLD_INTR_PHY0_MASK (0x80 >> 3)
  315. #define PPC7D_CPLD_INTR_ISANMI_MASK (0x80 >> 5)
  316. #define PPC7D_CPLD_INTR_CRITTEMP_MASK (0x80 >> 6)
  317. /* CPLD_INTR */
  318. #define PPC7D_CPLD_INTR_ENABLE_OFF (0)
  319. #define PPC7D_CPLD_INTR_ENABLE_ON (!0)
  320. /* CPLD_INTR_STATUS */
  321. #define PPC7D_CPLD_INTR_STATUS_OFF (0)
  322. #define PPC7D_CPLD_INTR_STATUS_ON (!0)
  323. /* CPLD_PCI_CONFIG */
  324. #define PPC7D_CPLD_PCI_CONFIG_PCI0_MASK 0x70
  325. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCI33 0x00
  326. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCI66 0x10
  327. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCIX33 0x40
  328. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCIX66 0x50
  329. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCIX100 0x60
  330. #define PPC7D_CPLD_PCI_CONFIG_PCI0_PCIX133 0x70
  331. #define PPC7D_CPLD_PCI_CONFIG_PCI1_MASK 0x07
  332. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCI33 0x00
  333. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCI66 0x01
  334. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCIX33 0x04
  335. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCIX66 0x05
  336. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCIX100 0x06
  337. #define PPC7D_CPLD_PCI_CONFIG_PCI1_PCIX133 0x07
  338. /* CPLD_BOARD_REVISION */
  339. #define PPC7D_CPLD_BOARD_REVISION_NUMBER_MASK 0xe0
  340. #define PPC7D_CPLD_BOARD_REVISION_LETTER_MASK 0x1f
  341. /* CPLD_EXTENDED_ID */
  342. #define PPC7D_CPLD_EXTENDED_ID_PPC7D 0x18
  343. /* CPLD_ID_LINK */
  344. #define PPC7D_CPLD_ID_LINK_VME64_GAP_MASK (0x80 >> 2)
  345. #define PPC7D_CPLD_ID_LINK_VME64_GA4_MASK (0x80 >> 3)
  346. #define PPC7D_CPLD_ID_LINK_E13_MASK (0x80 >> 4)
  347. #define PPC7D_CPLD_ID_LINK_E12_MASK (0x80 >> 5)
  348. #define PPC7D_CPLD_ID_LINK_E7_MASK (0x80 >> 6)
  349. #define PPC7D_CPLD_ID_LINK_E6_MASK (0x80 >> 7)
  350. /* CPLD_MOTHERBOARD_TYPE */
  351. #define PPC7D_CPLD_MB_TYPE_ECC_ENABLE_MASK (0x80 >> 0)
  352. #define PPC7D_CPLD_MB_TYPE_ECC_ENABLED (0x80 >> 0)
  353. #define PPC7D_CPLD_MB_TYPE_ECC_DISABLED (0 >> 0)
  354. #define PPC7D_CPLD_MB_TYPE_ECC_FITTED_MASK (0x80 >> 3)
  355. #define PPC7D_CPLD_MB_TYPE_PLL_MASK 0x0c
  356. #define PPC7D_CPLD_MB_TYPE_PLL_133 0x00
  357. #define PPC7D_CPLD_MB_TYPE_PLL_100 0x08
  358. #define PPC7D_CPLD_MB_TYPE_PLL_64 0x04
  359. #define PPC7D_CPLD_MB_TYPE_HW_ID_MASK 0x03
  360. /* CPLD_FLASH_WRITE_CNTL */
  361. #define PPD7D_CPLD_FLASH_CNTL_WR_LINK_MASK (0x80 >> 0)
  362. #define PPD7D_CPLD_FLASH_CNTL_WR_LINK_FITTED (0x80 >> 0)
  363. #define PPD7D_CPLD_FLASH_CNTL_BOOT_LINK_MASK (0x80 >> 2)
  364. #define PPD7D_CPLD_FLASH_CNTL_BOOT_LINK_FITTED (0x80 >> 2)
  365. #define PPD7D_CPLD_FLASH_CNTL_USER_LINK_MASK (0x80 >> 3)
  366. #define PPD7D_CPLD_FLASH_CNTL_USER_LINK_FITTED (0x80 >> 3)
  367. #define PPD7D_CPLD_FLASH_CNTL_RECO_WR_MASK (0x80 >> 5)
  368. #define PPD7D_CPLD_FLASH_CNTL_RECO_WR_ENABLED (0x80 >> 5)
  369. #define PPD7D_CPLD_FLASH_CNTL_BOOT_WR_MASK (0x80 >> 6)
  370. #define PPD7D_CPLD_FLASH_CNTL_BOOT_WR_ENABLED (0x80 >> 6)
  371. #define PPD7D_CPLD_FLASH_CNTL_USER_WR_MASK (0x80 >> 7)
  372. #define PPD7D_CPLD_FLASH_CNTL_USER_WR_ENABLED (0x80 >> 7)
  373. /* CPLD_SW_FLASH_WRITE_PROTECT */
  374. #define PPC7D_CPLD_SW_FLASH_WRPROT_ENABLED (!0)
  375. #define PPC7D_CPLD_SW_FLASH_WRPROT_DISABLED (0)
  376. #define PPC7D_CPLD_SW_FLASH_WRPROT_SYSBOOT_MASK (0x80 >> 6)
  377. #define PPC7D_CPLD_SW_FLASH_WRPROT_USER_MASK (0x80 >> 7)
  378. /* CPLD_FLASH_WRITE_CNTL */
  379. #define PPC7D_CPLD_FLASH_CNTL_NVRAM_PROT_MASK (0x80 >> 0)
  380. #define PPC7D_CPLD_FLASH_CNTL_NVRAM_DISABLED (0 >> 0)
  381. #define PPC7D_CPLD_FLASH_CNTL_NVRAM_ENABLED (0x80 >> 0)
  382. #define PPC7D_CPLD_FLASH_CNTL_ALTBOOT_LINK_MASK (0x80 >> 1)
  383. #define PPC7D_CPLD_FLASH_CNTL_VMEBOOT_LINK_MASK (0x80 >> 2)
  384. #define PPC7D_CPLD_FLASH_CNTL_RECBOOT_LINK_MASK (0x80 >> 3)
  385. #endif /* __PPC_PLATFORMS_PPC7D_H */