ip27config.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:21k
源码类别:

Linux/Unix编程

开发平台:

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