ip27config.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:21k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
  8.  * Copyright (C) 2000 by Colin Ngam
  9.  */
  10. #ifndef _ASM_SN_SN1_IP27CONFIG_H
  11. #define _ASM_SN_SN1_IP27CONFIG_H
  12. /*
  13.  * Structure:  ip27config_s
  14.  * Typedef: ip27config_t
  15.  * Purpose:  Maps out the region of the boot prom used to define
  16.  * configuration information.
  17.  * Notes:       Corresponds to ip27config structure found in start.s.
  18.  * Fields are ulong where possible to facilitate IP27 PROM fetches.
  19.  */
  20. #define CONFIG_INFO_OFFSET 0x60
  21. #define IP27CONFIG_ADDR (LBOOT_BASE     + 
  22.  CONFIG_INFO_OFFSET)
  23. #define IP27CONFIG_ADDR_NODE(n) (NODE_RBOOT_BASE(n) + 
  24.  CONFIG_INFO_OFFSET)
  25. /* Offset to the config_type field within local ip27config structure */
  26. #define CONFIG_FLAGS_ADDR (IP27CONFIG_ADDR + 72)
  27. /* Offset to the config_type field in the ip27config structure on 
  28.  * node with nasid n
  29.  */
  30. #define CONFIG_FLAGS_ADDR_NODE(n) (IP27CONFIG_ADDR_NODE(n) + 72)
  31. /* Meaning of each valid bit in the config flags 
  32.  * None are currently defined
  33.  */
  34. /* Meaning of each mach_type value
  35.  */
  36. #define SN1_MACH_TYPE 0
  37. /*
  38.  * Since 800 ns works well with various HUB frequencies, (such as 360,
  39.  * 380, 390, and 400 MHZ), we now use 800ns rtc cycle time instead of
  40.  * 1 microsec.
  41.  */
  42. #define IP27_RTC_FREQ 1250 /* 800ns cycle time */
  43. #if _LANGUAGE_C
  44. typedef struct ip27config_s { /* KEEP IN SYNC w/ start.s & below  */
  45.     uint time_const; /* Time constant      */
  46.     uint r10k_mode; /* R10k boot mode bits      */
  47.     uint64_t magic; /* CONFIG_MAGIC     */
  48.     uint64_t freq_cpu; /* Hz      */
  49.     uint64_t freq_hub; /* Hz      */
  50.     uint64_t freq_rtc; /* Hz      */
  51.     uint ecc_enable; /* ECC enable flag     */
  52.     uint fprom_cyc; /* FPROM_CYC speed control       */
  53.     uint mach_type; /* Inidicate IP27 (0) or Sn00 (1)    */
  54.     uint check_sum_adj; /* Used after config hdr overlay    */
  55. /* to make the checksum 0 again     */
  56.     uint flash_count; /* Value incr'd on each PROM flash  */
  57.     uint fprom_wr; /* FPROM_WR speed control       */
  58.     uint pvers_vers; /* Prom version number     */
  59.     uint pvers_rev; /* Prom revision number     */
  60.     uint config_type; /* To support special configurations
  61.  * (none currently defined)
  62.  */
  63. } ip27config_t;
  64. typedef struct {
  65.     uint r10k_mode; /* R10k boot mode bits      */
  66.     uint freq_cpu; /* Hz      */
  67.     uint freq_hub; /* Hz      */
  68.     char fprom_cyc; /* FPROM_CYC speed control       */
  69.     char mach_type; /* IP35(0) is only type defined      */
  70.     char fprom_wr; /* FPROM_WR speed control       */
  71. } config_modifiable_t;
  72. #define IP27CONFIG (*(ip27config_t *) IP27CONFIG_ADDR)
  73. #define IP27CONFIG_NODE(n) (*(ip27config_t *) IP27CONFIG_ADDR_NODE(n))
  74. #define SN00 0 /* IP35 has no Speedo equivalent */
  75. /* Get the config flags from local ip27config */
  76. #define CONFIG_FLAGS (*(uint *) (CONFIG_FLAGS_ADDR))
  77. /* Get the config flags from ip27config on the node
  78.  * with nasid n
  79.  */
  80. #define CONFIG_FLAGS_NODE(n) (*(uint *) (CONFIG_FLAGS_ADDR_NODE(n)))
  81. /* Macro to check if the local ip27config indicates a config
  82.  * of 12 p 4io
  83.  */
  84. #define CONFIG_12P4I (0) /* IP35 has no 12p4i equivalent */
  85. /* Macro to check if the ip27config on node with nasid n
  86.  * indicates a config of 12 p 4io
  87.  */
  88. #define CONFIG_12P4I_NODE(n) (0)
  89. #endif /* _LANGUAGE_C */
  90. #if _LANGUAGE_ASSEMBLY
  91. .struct 0 /* KEEP IN SYNC WITH C structure */
  92. ip27c_time_const: .word 0
  93. ip27c_r10k_mode: .word 0
  94. ip27c_magic: .dword 0
  95. ip27c_freq_cpu: .dword 0
  96. ip27c_freq_hub: .dword 0
  97. ip27c_freq_rtc: .dword 0
  98. ip27c_ecc_enable: .word 1
  99. ip27c_fprom_cyc: .word 0
  100. ip27c_mach_type: .word 0
  101. ip27c_check_sum_adj: .word 0
  102. ip27c_flash_count: .word 0
  103. ip27c_fprom_wr: .word 0
  104. ip27c_pvers_vers: .word 0
  105. ip27c_pvers_rev: .word 0
  106. ip27c_config_type: .word  0 /* To recognize special configs */
  107. #endif /* _LANGUAGE_ASSEMBLY */
  108. /*
  109.  * R10000 Configuration Cycle - These define the SYSAD values used
  110.  * during the reset cycle.
  111.  */
  112. #define IP27C_R10000_KSEG0CA_SHFT 0
  113. #define IP27C_R10000_KSEG0CA_MASK (7 << IP27C_R10000_KSEG0CA_SHFT)
  114. #define IP27C_R10000_KSEG0CA(_B)  ((_B) << IP27C_R10000_KSEG0CA_SHFT)
  115. #define IP27C_R10000_DEVNUM_SHFT 3
  116. #define IP27C_R10000_DEVNUM_MASK (3 << IP27C_R10000_DEVNUM_SHFT)
  117. #define IP27C_R10000_DEVNUM(_B) ((_B) << IP27C_R10000_DEVNUM_SHFT)
  118. #define IP27C_R10000_CRPT_SHFT 5
  119. #define IP27C_R10000_CRPT_MASK (1 << IP27C_R10000_CRPT_SHFT)
  120. #define IP27C_R10000_CPRT(_B) ((_B)<<IP27C_R10000_CRPT_SHFT)
  121. #define IP27C_R10000_PER_SHFT 6
  122. #define IP27C_R10000_PER_MASK (1 << IP27C_R10000_PER_SHFT)
  123. #define IP27C_R10000_PER(_B) ((_B) << IP27C_R10000_PER_SHFT)
  124. #define IP27C_R10000_PRM_SHFT 7
  125. #define IP27C_R10000_PRM_MASK (3 << IP27C_R10000_PRM_SHFT)
  126. #define IP27C_R10000_PRM(_B) ((_B) << IP27C_R10000_PRM_SHFT)
  127. #define IP27C_R10000_SCD_SHFT 9
  128. #define IP27C_R10000_SCD_MASK (0xf << IP27C_R10000_SCD_MASK)
  129. #define IP27C_R10000_SCD(_B) ((_B) << IP27C_R10000_SCD_SHFT)
  130. #define IP27C_R10000_SCBS_SHFT 13
  131. #define IP27C_R10000_SCBS_MASK (1 << IP27C_R10000_SCBS_SHFT)
  132. #define IP27C_R10000_SCBS(_B) (((_B)) << IP27C_R10000_SCBS_SHFT)
  133. #define IP27C_R10000_SCCE_SHFT 14
  134. #define IP27C_R10000_SCCE_MASK (1 << IP27C_R10000_SCCE_SHFT)
  135. #define IP27C_R10000_SCCE(_B) ((_B) << IP27C_R10000_SCCE_SHFT)
  136. #define IP27C_R10000_ME_SHFT 15
  137. #define IP27C_R10000_ME_MASK (1 << IP27C_R10000_ME_SHFT)
  138. #define IP27C_R10000_ME(_B) ((_B) << IP27C_R10000_ME_SHFT)
  139. #define IP27C_R10000_SCS_SHFT 16
  140. #define IP27C_R10000_SCS_MASK (7 << IP27C_R10000_SCS_SHFT)
  141. #define IP27C_R10000_SCS(_B) ((_B) << IP27C_R10000_SCS_SHFT)
  142. #define IP27C_R10000_SCCD_SHFT 19
  143. #define IP27C_R10000_SCCD_MASK (7 << IP27C_R10000_SCCD_SHFT)
  144. #define IP27C_R10000_SCCD(_B) ((_B) << IP27C_R10000_SCCD_SHFT)
  145. #define IP27C_R10000_DDR_SHFT 23
  146. #define IP27C_R10000_DDR_MASK (1 << IP27C_R10000_DDR_SHFT)
  147. #define IP27C_R10000_DDR(_B) ((_B) << IP27C_R10000_DDR_SHFT)
  148. #define IP27C_R10000_SCCT_SHFT 25
  149. #define IP27C_R10000_SCCT_MASK (0xf << IP27C_R10000_SCCT_SHFT)
  150. #define IP27C_R10000_SCCT(_B) ((_B) << IP27C_R10000_SCCT_SHFT)
  151. #define IP27C_R10000_ODSC_SHFT 29
  152. #define IP27C_R10000_ODSC_MASK (1 << IP27C_R10000_ODSC_SHFT)
  153. #define IP27C_R10000_ODSC(_B) ((_B) << IP27C_R10000_ODSC_SHFT)
  154. #define IP27C_R10000_ODSYS_SHFT 30
  155. #define IP27C_R10000_ODSYS_MASK (1 << IP27C_R10000_ODSYS_SHFT)
  156. #define IP27C_R10000_ODSYS(_B) ((_B) << IP27C_R10000_ODSYS_SHFT)
  157. #define IP27C_R10000_CTM_SHFT 31
  158. #define IP27C_R10000_CTM_MASK (1 << IP27C_R10000_CTM_SHFT)
  159. #define IP27C_R10000_CTM(_B) ((_B) << IP27C_R10000_CTM_SHFT)
  160. #define IP27C_MHZ(x) (1000000 * (x))
  161. #define IP27C_KHZ(x) (1000 * (x))
  162. #define IP27C_MB(x) ((x) << 20)
  163. /*
  164.  * PROM Configurations
  165.  */
  166. #define CONFIG_MAGIC 0x69703237636f6e66
  167. /* The high 32 bits of the "mode bits".  Bits 7..0 contain one more
  168.  * than the number of 5ms clocks in the 100ms "long delay" intervals
  169.  * of the TRex reset sequence.  Bit 8 is the "synergy mode" bit.
  170.  */
  171. #define CONFIG_TIME_CONST 0x15
  172. #define CONFIG_ECC_ENABLE 1
  173. #define CONFIG_CHECK_SUM_ADJ 0
  174. #define CONFIG_DEFAULT_FLASH_COUNT    0
  175. /*
  176.  * Some promICEs have trouble if CONFIG_FPROM_SETUP is too low.
  177.  * The nominal value for 100 MHz hub is 5, for 200MHz bedrock is 16.
  178.  * any update to the below should also reflected in the logic in
  179.  *   IO7prom/flashprom.c function _verify_config_info and _fill_in_config_info
  180.  */
  181. /* default junk bus timing values to use */
  182. #define CONFIG_SYNERGY_ENABLE 0xff
  183. #define CONFIG_SYNERGY_SETUP 0xff
  184. #define CONFIG_UART_ENABLE 0x0c
  185. #define CONFIG_UART_SETUP 0x02
  186. #define CONFIG_FPROM_ENABLE 0x10
  187. #define CONFIG_FPROM_SETUP 0x10
  188. #define CONFIG_FREQ_RTC IP27C_KHZ(IP27_RTC_FREQ)
  189. #if _LANGUAGE_C
  190. /* we are going to define all the known configs is a table
  191.  * for building hex images we will pull out the particular
  192.  * slice we care about by using the IP27_CONFIG_XX_XX as
  193.  * entries into the table
  194.  * to keep the table of reasonable size we only include the
  195.  * values that differ across configurations
  196.  * please note then that this makes assumptions about what
  197.  * will and will not change across configurations
  198.  */
  199. /* these numbers are as the are ordered in the table below */
  200. #define IP27_CONFIG_UNKNOWN -1
  201. #define IP27_CONFIG_SN1_1MB_200_400_200_TABLE 0
  202. #define IP27_CONFIG_SN00_4MB_100_200_133_TABLE 1
  203. #define IP27_CONFIG_SN1_4MB_200_400_267_TABLE 2
  204. #define IP27_CONFIG_SN1_8MB_200_500_250_TABLE 3
  205. #define IP27_CONFIG_SN1_8MB_200_400_267_TABLE 4
  206. #define IP27_CONFIG_SN1_4MB_180_360_240_TABLE 5
  207. #define NUMB_IP_CONFIGS 6
  208. #ifdef DEF_IP_CONFIG_TABLE
  209. /*
  210.  * N.B.: A new entry needs to be added here everytime a new config is added
  211.  * The table is indexed by the PIMM PSC value
  212.  */
  213. static int psc_to_flash_config[] = {
  214.         IP27_CONFIG_SN1_4MB_200_400_267_TABLE, /* 0x0 */
  215.         IP27_CONFIG_SN1_8MB_200_500_250_TABLE, /* 0x1 */
  216.         IP27_CONFIG_SN1_8MB_200_400_267_TABLE, /* 0x2 */
  217.         IP27_CONFIG_UNKNOWN, /* 0x3 */
  218.         IP27_CONFIG_UNKNOWN, /* 0x4 */
  219.         IP27_CONFIG_UNKNOWN, /* 0x5 */
  220.         IP27_CONFIG_UNKNOWN, /* 0x6 */
  221.         IP27_CONFIG_UNKNOWN, /* 0x7 */
  222.         IP27_CONFIG_SN1_4MB_180_360_240_TABLE, /* 0x8 */
  223.         IP27_CONFIG_UNKNOWN, /* 0x9 */
  224.         IP27_CONFIG_UNKNOWN, /* 0xa */
  225.         IP27_CONFIG_UNKNOWN, /* 0xb */
  226.         IP27_CONFIG_UNKNOWN, /* 0xc */
  227.         IP27_CONFIG_UNKNOWN, /* 0xd */
  228.         IP27_CONFIG_SN00_4MB_100_200_133_TABLE, /* 0xe  O200 PIMM for bringup */
  229.         IP27_CONFIG_UNKNOWN /* 0xf == PIMM not installed */
  230. };
  231. static config_modifiable_t ip_config_table[NUMB_IP_CONFIGS] = {
  232. /* the 1MB_200_400_200 values (Generic settings, will work for any config.) */
  233. {
  234. (IP27C_R10000_KSEG0CA(5) + 
  235.  IP27C_R10000_DEVNUM(0)  + 
  236.  IP27C_R10000_CPRT(0)  + 
  237.  IP27C_R10000_PER(0)  + 
  238.  IP27C_R10000_PRM(3)  + 
  239.  IP27C_R10000_SCD(3)  + 
  240.  IP27C_R10000_SCBS(1)  + 
  241.  IP27C_R10000_SCCE(0)  + 
  242.  IP27C_R10000_ME(1)  + 
  243.  IP27C_R10000_SCS(1)  + 
  244.  IP27C_R10000_SCCD(3)  + 
  245.  IP27C_R10000_SCCT(9)  + 
  246.  IP27C_R10000_ODSC(0)  + 
  247.  IP27C_R10000_ODSYS(1)  + 
  248.  IP27C_R10000_CTM(0)),
  249. IP27C_MHZ(400),
  250. IP27C_MHZ(200),
  251. CONFIG_FPROM_SETUP,
  252. SN1_MACH_TYPE,
  253. CONFIG_FPROM_ENABLE
  254. },
  255. /* the 4MB_100_200_133 values (O200 PIMM w/translation board, PSC 0xe)
  256.  * (SysAD at 100MHz (SCD=3), and bedrock core at 200 MHz) */
  257. {
  258.  /* ODSYS == 0 means HSTL1 on SysAD bus; other PIMMs use HSTL2 */
  259. (IP27C_R10000_KSEG0CA(5) + 
  260.  IP27C_R10000_DEVNUM(0)  + 
  261.  IP27C_R10000_CPRT(0)  + 
  262.  IP27C_R10000_PER(0)  + 
  263.  IP27C_R10000_PRM(3)  + 
  264.  IP27C_R10000_SCD(3)  + 
  265.  IP27C_R10000_SCBS(1)  + 
  266.  IP27C_R10000_SCCE(0)  + 
  267.  IP27C_R10000_ME(1)  + 
  268.  IP27C_R10000_SCS(3)  + 
  269.  IP27C_R10000_SCCD(2)  + 
  270.  IP27C_R10000_SCCT(9)  + 
  271.  IP27C_R10000_ODSC(0)  + 
  272.  IP27C_R10000_ODSYS(0)  + 
  273.  IP27C_R10000_CTM(0)),
  274. IP27C_MHZ(200),
  275. IP27C_MHZ(200),
  276. CONFIG_FPROM_SETUP,
  277. SN1_MACH_TYPE,
  278. CONFIG_FPROM_ENABLE
  279. },
  280. /* 4MB_200_400_267 values (R12KS, 3.7ns, LWR, 030-1602-001, PSC 0x0) */
  281. {
  282. (IP27C_R10000_KSEG0CA(5) + 
  283.  IP27C_R10000_DEVNUM(0)  + 
  284.  IP27C_R10000_CPRT(0)  + 
  285.  IP27C_R10000_PER(0)  + 
  286.  IP27C_R10000_PRM(3)  + 
  287.  IP27C_R10000_SCD(3)  + 
  288.  IP27C_R10000_SCBS(1)  + 
  289.  IP27C_R10000_SCCE(0)  + 
  290.  IP27C_R10000_ME(1)  + 
  291.  IP27C_R10000_SCS(3)  + 
  292.  IP27C_R10000_SCCD(2)  + 
  293.  IP27C_R10000_SCCT(0xa)  + 
  294.  IP27C_R10000_ODSC(0)  + 
  295.  IP27C_R10000_ODSYS(1)  + 
  296.  IP27C_R10000_CTM(0)),
  297. IP27C_MHZ(400),
  298. IP27C_MHZ(200),
  299. CONFIG_FPROM_SETUP,
  300. SN1_MACH_TYPE,
  301. CONFIG_FPROM_ENABLE
  302. },
  303. /* 8MB_200_500_250 values (R14K, 4.0ns, DDR1, 030-1520-001, PSC 0x1) */
  304. {
  305. (IP27C_R10000_KSEG0CA(5) + 
  306.  IP27C_R10000_DEVNUM(0)  + 
  307.  IP27C_R10000_CPRT(0)  + 
  308.  IP27C_R10000_PER(0)  + 
  309.  IP27C_R10000_PRM(3)  + 
  310.  IP27C_R10000_SCD(4)  + 
  311.  IP27C_R10000_SCBS(1)  + 
  312.  IP27C_R10000_SCCE(0)  + 
  313.  IP27C_R10000_ME(1)  + 
  314.  IP27C_R10000_SCS(4)  + 
  315.  IP27C_R10000_DDR(1)     + 
  316.  IP27C_R10000_SCCD(3)  + 
  317.  IP27C_R10000_SCCT(0xa)  + 
  318.  IP27C_R10000_ODSC(0)  + 
  319.  IP27C_R10000_ODSYS(1)  + 
  320.  IP27C_R10000_CTM(0)),
  321. IP27C_MHZ(500),
  322. IP27C_MHZ(200),
  323. CONFIG_FPROM_SETUP,
  324. SN1_MACH_TYPE,
  325. CONFIG_FPROM_ENABLE
  326. },
  327. /* 8MB_200_400_267 values (R12KS, 3.7ns, LWR, 030-1616-001, PSC 0x2) */
  328. {
  329. (IP27C_R10000_KSEG0CA(5) + 
  330.  IP27C_R10000_DEVNUM(0)  + 
  331.  IP27C_R10000_CPRT(0)  + 
  332.  IP27C_R10000_PER(0)  + 
  333.  IP27C_R10000_PRM(3)  + 
  334.  IP27C_R10000_SCD(3)  + 
  335.  IP27C_R10000_SCBS(1)  + 
  336.  IP27C_R10000_SCCE(0)  + 
  337.  IP27C_R10000_ME(1)  + 
  338.  IP27C_R10000_SCS(4)  + 
  339.  IP27C_R10000_SCCD(2)  + 
  340.  IP27C_R10000_SCCT(0xa)  + 
  341.  IP27C_R10000_ODSC(0)  + 
  342.  IP27C_R10000_ODSYS(1)  + 
  343.  IP27C_R10000_CTM(0)),
  344. IP27C_MHZ(400),
  345. IP27C_MHZ(200),
  346. CONFIG_FPROM_SETUP,
  347. SN1_MACH_TYPE,
  348. CONFIG_FPROM_ENABLE
  349. },
  350. /* 4MB_180_360_240 values (R12KS, 3.7ns, LWR, 030-1627-001, PSC 0x8)
  351.  * (SysAD at 180 MHz (SCD=3, the fastest possible), bedrock core at 200MHz) */
  352. {
  353. (IP27C_R10000_KSEG0CA(5) + 
  354.  IP27C_R10000_DEVNUM(0)  + 
  355.  IP27C_R10000_CPRT(0)  + 
  356.  IP27C_R10000_PER(0)  + 
  357.  IP27C_R10000_PRM(3)  + 
  358.  IP27C_R10000_SCD(3)  + 
  359.  IP27C_R10000_SCBS(1)  + 
  360.  IP27C_R10000_SCCE(0)  + 
  361.  IP27C_R10000_ME(1)  + 
  362.  IP27C_R10000_SCS(3)  + 
  363.  IP27C_R10000_SCCD(2)  + 
  364.  IP27C_R10000_SCCT(9)  + 
  365.  IP27C_R10000_ODSC(0)  + 
  366.  IP27C_R10000_ODSYS(1)  + 
  367.  IP27C_R10000_CTM(0)),
  368. IP27C_MHZ(360),
  369. IP27C_MHZ(200),
  370. CONFIG_FPROM_SETUP,
  371. SN1_MACH_TYPE,
  372. CONFIG_FPROM_ENABLE
  373. },
  374. };
  375. #else
  376. extern config_modifiable_t ip_config_table[];
  377. #endif /* DEF_IP27_CONFIG_TABLE */
  378. #ifdef IP27_CONFIG_SN00_4MB_100_200_133
  379. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].r10k_mode
  380. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].freq_cpu
  381. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].freq_hub
  382. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].fprom_cyc
  383. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].mach_type
  384. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN00_4MB_100_200_133_TABLE].fprom_wr
  385. #endif /* IP27_CONFIG_SN00_4MB_100_200_133 */
  386. #ifdef IP27_CONFIG_SN1_1MB_200_400_200
  387. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].r10k_mode
  388. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].freq_cpu
  389. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].freq_hub
  390. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].fprom_cyc
  391. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].mach_type
  392. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN1_1MB_200_400_200_TABLE].fprom_wr
  393. #endif /* IP27_CONFIG_SN1_1MB_200_400_200 */
  394. #ifdef IP27_CONFIG_SN1_4MB_200_400_267
  395. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].r10k_mode
  396. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].freq_cpu
  397. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].freq_hub
  398. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].fprom_cyc
  399. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].mach_type
  400. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN1_4MB_200_400_267_TABLE].fprom_wr
  401. #endif /* IP27_CONFIG_SN1_4MB_200_400_267 */
  402. #ifdef IP27_CONFIG_SN1_8MB_200_500_250
  403. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].r10k_mode
  404. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].freq_cpu
  405. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].freq_hub
  406. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].fprom_cyc
  407. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].mach_type
  408. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN1_8MB_200_500_250_TABLE].fprom_wr
  409. #endif /* IP27_CONFIG_SN1_8MB_200_500_250 */
  410. #ifdef IP27_CONFIG_SN1_8MB_200_400_267
  411. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].r10k_mode
  412. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].freq_cpu
  413. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].freq_hub
  414. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].fprom_cyc
  415. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].mach_type
  416. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN1_8MB_200_400_267_TABLE].fprom_wr
  417. #endif /* IP27_CONFIG_SN1_8MB_200_400_267 */
  418. #ifdef IP27_CONFIG_SN1_4MB_180_360_240
  419. #define CONFIG_CPU_MODE ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].r10k_mode
  420. #define CONFIG_FREQ_CPU ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].freq_cpu
  421. #define CONFIG_FREQ_HUB ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].freq_hub
  422. #define CONFIG_FPROM_CYC ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].fprom_cyc
  423. #define CONFIG_MACH_TYPE ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].mach_type
  424. #define CONFIG_FPROM_WR ip_config_table[IP27_CONFIG_SN1_4MB_180_360_240_TABLE].fprom_wr
  425. #endif /* IP27_CONFIG_SN1_4MB_180_360_240 */
  426. #endif /* _LANGUAGE_C */
  427. #if _LANGUAGE_ASSEMBLY
  428. /* these need to be in here since we need assembly definitions
  429.  * for building hex images (as required by start.s)
  430.  */
  431. #ifdef IP27_CONFIG_SN00_4MB_100_200_133
  432. #define BRINGUP_PRM_VAL 3
  433. #define CONFIG_CPU_MODE 
  434. (IP27C_R10000_KSEG0CA(5) + 
  435.  IP27C_R10000_DEVNUM(0)  + 
  436.  IP27C_R10000_CPRT(0)  + 
  437.  IP27C_R10000_PER(0)  + 
  438.  IP27C_R10000_PRM(BRINGUP_PRM_VAL)  + 
  439.  IP27C_R10000_SCD(3)  + 
  440.  IP27C_R10000_SCBS(1)  + 
  441.  IP27C_R10000_SCCE(0)  + 
  442.  IP27C_R10000_ME(1)  + 
  443.  IP27C_R10000_SCS(3)  + 
  444.  IP27C_R10000_SCCD(2)  + 
  445.  IP27C_R10000_SCCT(9)  + 
  446.  IP27C_R10000_ODSC(0)  + 
  447.  IP27C_R10000_ODSYS(0)  + 
  448.  IP27C_R10000_CTM(0))
  449. #define CONFIG_FREQ_CPU IP27C_MHZ(200)
  450. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  451. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  452. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  453. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  454. #endif /* IP27_CONFIG_SN00_4MB_100_200_133 */
  455. #ifdef IP27_CONFIG_SN1_1MB_200_400_200
  456. #define CONFIG_CPU_MODE 
  457. (IP27C_R10000_KSEG0CA(5) + 
  458.  IP27C_R10000_DEVNUM(0)  + 
  459.  IP27C_R10000_CPRT(0)  + 
  460.  IP27C_R10000_PER(0)  + 
  461.  IP27C_R10000_PRM(3)  + 
  462.  IP27C_R10000_SCD(3)  + 
  463.  IP27C_R10000_SCBS(1)  + 
  464.  IP27C_R10000_SCCE(0)  + 
  465.  IP27C_R10000_ME(1)  + 
  466.  IP27C_R10000_SCS(1)  + 
  467.  IP27C_R10000_SCCD(3)  + 
  468.  IP27C_R10000_SCCT(9)  + 
  469.  IP27C_R10000_ODSC(0)  + 
  470.  IP27C_R10000_ODSYS(1)  + 
  471.  IP27C_R10000_CTM(0))
  472. #define CONFIG_FREQ_CPU IP27C_MHZ(400)
  473. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  474. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  475. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  476. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  477. #endif /* IP27_CONFIG_SN1_1MB_200_400_200 */
  478. #ifdef IP27_CONFIG_SN1_4MB_200_400_267
  479. #define CONFIG_CPU_MODE 
  480. (IP27C_R10000_KSEG0CA(5) + 
  481.  IP27C_R10000_DEVNUM(0)  + 
  482.  IP27C_R10000_CPRT(0)  + 
  483.  IP27C_R10000_PER(0)  + 
  484.  IP27C_R10000_PRM(3)  + 
  485.  IP27C_R10000_SCD(3)  + 
  486.  IP27C_R10000_SCBS(1)  + 
  487.  IP27C_R10000_SCCE(0)  + 
  488.  IP27C_R10000_ME(1)  + 
  489.  IP27C_R10000_SCS(3)  + 
  490.  IP27C_R10000_SCCD(2)  + 
  491.  IP27C_R10000_SCCT(0xa)  + 
  492.  IP27C_R10000_ODSC(0)  + 
  493.  IP27C_R10000_ODSYS(1)  + 
  494.  IP27C_R10000_CTM(0))
  495. #define CONFIG_FREQ_CPU IP27C_MHZ(400)
  496. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  497. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  498. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  499. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  500. #endif /* IP27_CONFIG_SN1_4MB_200_400_267 */
  501. #ifdef IP27_CONFIG_SN1_8MB_200_500_250
  502. #define CONFIG_CPU_MODE 
  503. (IP27C_R10000_KSEG0CA(5) + 
  504.  IP27C_R10000_DEVNUM(0)  + 
  505.  IP27C_R10000_CPRT(0)  + 
  506.  IP27C_R10000_PER(0)  + 
  507.  IP27C_R10000_PRM(3)  + 
  508.  IP27C_R10000_SCD(4)  + 
  509.  IP27C_R10000_SCBS(1)  + 
  510.  IP27C_R10000_SCCE(0)  + 
  511.  IP27C_R10000_ME(1)  + 
  512.  IP27C_R10000_SCS(4)  + 
  513.  IP27C_R10000_SCCD(3)  + 
  514.          IP27C_R10000_DDR(1)     + 
  515.  IP27C_R10000_SCCT(0xa)  + 
  516.  IP27C_R10000_ODSC(0)  + 
  517.  IP27C_R10000_ODSYS(1)  + 
  518.  IP27C_R10000_CTM(0))
  519. #define CONFIG_FREQ_CPU IP27C_MHZ(500)
  520. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  521. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  522. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  523. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  524. #endif /* IP27_CONFIG_SN1_8MB_200_500_250 */
  525. #ifdef IP27_CONFIG_SN1_8MB_200_400_267
  526. #define CONFIG_CPU_MODE 
  527. (IP27C_R10000_KSEG0CA(5) + 
  528.  IP27C_R10000_DEVNUM(0)  + 
  529.  IP27C_R10000_CPRT(0)  + 
  530.  IP27C_R10000_PER(0)  + 
  531.  IP27C_R10000_PRM(3)  + 
  532.  IP27C_R10000_SCD(3)  + 
  533.  IP27C_R10000_SCBS(1)  + 
  534.  IP27C_R10000_SCCE(0)  + 
  535.  IP27C_R10000_ME(1)  + 
  536.  IP27C_R10000_SCS(4)  + 
  537.  IP27C_R10000_SCCD(2)  + 
  538.  IP27C_R10000_SCCT(0xa)  + 
  539.  IP27C_R10000_ODSC(0)  + 
  540.  IP27C_R10000_ODSYS(1)  + 
  541.  IP27C_R10000_CTM(0))
  542. #define CONFIG_FREQ_CPU IP27C_MHZ(400)
  543. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  544. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  545. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  546. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  547. #endif /* IP27_CONFIG_SN1_8MB_200_400_267 */
  548. #ifdef IP27_CONFIG_SN1_4MB_180_360_240
  549. #define CONFIG_CPU_MODE 
  550. (IP27C_R10000_KSEG0CA(5) + 
  551.  IP27C_R10000_DEVNUM(0)  + 
  552.  IP27C_R10000_CPRT(0)  + 
  553.  IP27C_R10000_PER(0)  + 
  554.  IP27C_R10000_PRM(3)  + 
  555.  IP27C_R10000_SCD(3)  + 
  556.  IP27C_R10000_SCBS(1)  + 
  557.  IP27C_R10000_SCCE(0)  + 
  558.  IP27C_R10000_ME(1)  + 
  559.  IP27C_R10000_SCS(3)  + 
  560.  IP27C_R10000_SCCD(2)  + 
  561.  IP27C_R10000_SCCT(9)  + 
  562.  IP27C_R10000_ODSC(0)  + 
  563.  IP27C_R10000_ODSYS(1)  + 
  564.  IP27C_R10000_CTM(0))
  565. #define CONFIG_FREQ_CPU IP27C_MHZ(360)
  566. #define CONFIG_FREQ_HUB IP27C_MHZ(200)
  567. #define CONFIG_FPROM_CYC CONFIG_FPROM_SETUP
  568. #define CONFIG_MACH_TYPE SN1_MACH_TYPE
  569. #define CONFIG_FPROM_WR CONFIG_FPROM_ENABLE
  570. #endif /* IP27_CONFIG_SN1_4MB_180_360_240 */
  571. #endif /* _LANGUAGE_C */
  572. #endif /* _ASM_SN_SN1_IP27CONFIG_H */