ocotea.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. /*
  2. * Copyright (C) 2004 PaulReynolds@lhsolutions.com
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #include <common.h>
  23. #include "ocotea.h"
  24. #include <asm/processor.h>
  25. #include <spd_sdram.h>
  26. #include <440gx_enet.h>
  27. #define BOOT_SMALL_FLASH 32 /* 00100000 */
  28. #define FLASH_ONBD_N 2 /* 00000010 */
  29. #define FLASH_SRAM_SEL 1 /* 00000001 */
  30. long int fixed_sdram (void);
  31. void fpga_init (void);
  32. int board_early_init_f (void)
  33. {
  34. unsigned long mfr;
  35. /*-------------------------------------------------------------------------+
  36. | Initialize EBC CONFIG
  37. +-------------------------------------------------------------------------*/
  38. mtebc(xbcfg, EBC_CFG_LE_UNLOCK |
  39. EBC_CFG_PTD_ENABLE | EBC_CFG_RTC_64PERCLK |
  40. EBC_CFG_ATC_PREVIOUS | EBC_CFG_DTC_PREVIOUS |
  41. EBC_CFG_CTC_PREVIOUS | EBC_CFG_EMC_NONDEFAULT |
  42. EBC_CFG_PME_DISABLE | EBC_CFG_PR_32);
  43. /*-------------------------------------------------------------------------+
  44. | 1 MB FLASH / 1 MB SRAM. Initialize bank 0 with default values.
  45. +-------------------------------------------------------------------------*/
  46. mtebc(pb0ap, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(8)|
  47. EBC_BXAP_BCE_DISABLE|
  48. EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
  49. EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
  50. EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
  51. EBC_BXAP_BEM_WRITEONLY|
  52. EBC_BXAP_PEN_DISABLED);
  53. mtebc(pb0cr, EBC_BXCR_BAS_ENCODE(0xFFE00000)|
  54. EBC_BXCR_BS_2MB|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);
  55. /*-------------------------------------------------------------------------+
  56. | 8KB NVRAM/RTC. Initialize bank 1 with default values.
  57. +-------------------------------------------------------------------------*/
  58. mtebc(pb1ap, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(10)|
  59. EBC_BXAP_BCE_DISABLE|
  60. EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
  61. EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
  62. EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
  63. EBC_BXAP_BEM_WRITEONLY|
  64. EBC_BXAP_PEN_DISABLED);
  65. mtebc(pb1cr, EBC_BXCR_BAS_ENCODE(0x48000000)|
  66. EBC_BXCR_BS_1MB|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);
  67. /*-------------------------------------------------------------------------+
  68. | 4 MB FLASH. Initialize bank 2 with default values.
  69. +-------------------------------------------------------------------------*/
  70. mtebc(pb2ap, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(10)|
  71. EBC_BXAP_BCE_DISABLE|
  72. EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
  73. EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
  74. EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
  75. EBC_BXAP_BEM_WRITEONLY|
  76. EBC_BXAP_PEN_DISABLED);
  77. mtebc(pb2cr, EBC_BXCR_BAS_ENCODE(0xFF800000)|
  78. EBC_BXCR_BS_4MB|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);
  79. /*-------------------------------------------------------------------------+
  80. | FPGA. Initialize bank 7 with default values.
  81. +-------------------------------------------------------------------------*/
  82. mtebc(pb7ap, EBC_BXAP_BME_DISABLED|EBC_BXAP_TWT_ENCODE(7)|
  83. EBC_BXAP_BCE_DISABLE|
  84. EBC_BXAP_CSN_ENCODE(1)|EBC_BXAP_OEN_ENCODE(1)|
  85. EBC_BXAP_WBN_ENCODE(1)|EBC_BXAP_WBF_ENCODE(1)|
  86. EBC_BXAP_TH_ENCODE(1)|EBC_BXAP_RE_DISABLED|
  87. EBC_BXAP_BEM_WRITEONLY|
  88. EBC_BXAP_PEN_DISABLED);
  89. mtebc(pb7cr, EBC_BXCR_BAS_ENCODE(0x48300000)|
  90. EBC_BXCR_BS_1MB|EBC_BXCR_BU_RW|EBC_BXCR_BW_8BIT);
  91. /*--------------------------------------------------------------------
  92. * Setup the interrupt controller polarities, triggers, etc.
  93. *-------------------------------------------------------------------*/
  94. mtdcr (uic0sr, 0xffffffff); /* clear all */
  95. mtdcr (uic0er, 0x00000000); /* disable all */
  96. mtdcr (uic0cr, 0x00000009); /* SMI & UIC1 crit are critical */
  97. mtdcr (uic0pr, 0xfffffe13); /* per ref-board manual */
  98. mtdcr (uic0tr, 0x01c00008); /* per ref-board manual */
  99. mtdcr (uic0vr, 0x00000001); /* int31 highest, base=0x000 */
  100. mtdcr (uic0sr, 0xffffffff); /* clear all */
  101. mtdcr (uic1sr, 0xffffffff); /* clear all */
  102. mtdcr (uic1er, 0x00000000); /* disable all */
  103. mtdcr (uic1cr, 0x00000000); /* all non-critical */
  104. mtdcr (uic1pr, 0xffffe0ff); /* per ref-board manual */
  105. mtdcr (uic1tr, 0x00ffc000); /* per ref-board manual */
  106. mtdcr (uic1vr, 0x00000001); /* int31 highest, base=0x000 */
  107. mtdcr (uic1sr, 0xffffffff); /* clear all */
  108. mtdcr (uic2sr, 0xffffffff); /* clear all */
  109. mtdcr (uic2er, 0x00000000); /* disable all */
  110. mtdcr (uic2cr, 0x00000000); /* all non-critical */
  111. mtdcr (uic2pr, 0xffffffff); /* per ref-board manual */
  112. mtdcr (uic2tr, 0x00ff8c0f); /* per ref-board manual */
  113. mtdcr (uic2vr, 0x00000001); /* int31 highest, base=0x000 */
  114. mtdcr (uic2sr, 0xffffffff); /* clear all */
  115. mtdcr (uicb0sr, 0xfc000000); /* clear all */
  116. mtdcr (uicb0er, 0x00000000); /* disable all */
  117. mtdcr (uicb0cr, 0x00000000); /* all non-critical */
  118. mtdcr (uicb0pr, 0xfc000000); /* */
  119. mtdcr (uicb0tr, 0x00000000); /* */
  120. mtdcr (uicb0vr, 0x00000001); /* */
  121. mfsdr (sdr_mfr, mfr);
  122. mfr &= ~SDR0_MFR_ECS_MASK;
  123. /* mtsdr(sdr_mfr, mfr); */
  124. fpga_init();
  125. return 0;
  126. }
  127. int checkboard (void)
  128. {
  129. sys_info_t sysinfo;
  130. get_sys_info (&sysinfo);
  131. printf ("Board: IBM 440GX Evaluation Board\n");
  132. printf ("\tVCO: %lu MHz\n", sysinfo.freqVCOMhz / 1000000);
  133. printf ("\tCPU: %lu MHz\n", sysinfo.freqProcessor / 1000000);
  134. printf ("\tPLB: %lu MHz\n", sysinfo.freqPLB / 1000000);
  135. printf ("\tOPB: %lu MHz\n", sysinfo.freqOPB / 1000000);
  136. printf ("\tEPB: %lu MHz\n", sysinfo.freqEPB / 1000000);
  137. return (0);
  138. }
  139. long int initdram (int board_type)
  140. {
  141. long dram_size = 0;
  142. #if defined(CONFIG_SPD_EEPROM)
  143. dram_size = spd_sdram (0);
  144. #else
  145. dram_size = fixed_sdram ();
  146. #endif
  147. return dram_size;
  148. }
  149. #if defined(CFG_DRAM_TEST)
  150. int testdram (void)
  151. {
  152. uint *pstart = (uint *) 0x00000000;
  153. uint *pend = (uint *) 0x08000000;
  154. uint *p;
  155. for (p = pstart; p < pend; p++)
  156. *p = 0xaaaaaaaa;
  157. for (p = pstart; p < pend; p++) {
  158. if (*p != 0xaaaaaaaa) {
  159. printf ("SDRAM test fails at: %08x\n", (uint) p);
  160. return 1;
  161. }
  162. }
  163. for (p = pstart; p < pend; p++)
  164. *p = 0x55555555;
  165. for (p = pstart; p < pend; p++) {
  166. if (*p != 0x55555555) {
  167. printf ("SDRAM test fails at: %08x\n", (uint) p);
  168. return 1;
  169. }
  170. }
  171. return 0;
  172. }
  173. #endif
  174. #if !defined(CONFIG_SPD_EEPROM)
  175. /*************************************************************************
  176. * fixed sdram init -- doesn't use serial presence detect.
  177. *
  178. * Assumes: 128 MB, non-ECC, non-registered
  179. * PLB @ 133 MHz
  180. *
  181. ************************************************************************/
  182. long int fixed_sdram (void)
  183. {
  184. uint reg;
  185. /*--------------------------------------------------------------------
  186. * Setup some default
  187. *------------------------------------------------------------------*/
  188. mtsdram (mem_uabba, 0x00000000); /* ubba=0 (default) */
  189. mtsdram (mem_slio, 0x00000000); /* rdre=0 wrre=0 rarw=0 */
  190. mtsdram (mem_devopt, 0x00000000); /* dll=0 ds=0 (normal) */
  191. mtsdram (mem_wddctr, 0x00000000); /* wrcp=0 dcd=0 */
  192. mtsdram (mem_clktr, 0x40000000); /* clkp=1 (90 deg wr) dcdt=0 */
  193. /*--------------------------------------------------------------------
  194. * Setup for board-specific specific mem
  195. *------------------------------------------------------------------*/
  196. /*
  197. * Following for CAS Latency = 2.5 @ 133 MHz PLB
  198. */
  199. mtsdram (mem_b0cr, 0x000a4001); /* SDBA=0x000 128MB, Mode 3, enabled */
  200. mtsdram (mem_tr0, 0x410a4012); /* WR=2 WD=1 CL=2.5 PA=3 CP=4 LD=2 */
  201. /* RA=10 RD=3 */
  202. mtsdram (mem_tr1, 0x8080082f); /* SS=T2 SL=STAGE 3 CD=1 CT=0x02f */
  203. mtsdram (mem_rtr, 0x08200000); /* Rate 15.625 ns @ 133 MHz PLB */
  204. mtsdram (mem_cfg1, 0x00000000); /* Self-refresh exit, disable PM */
  205. udelay (400); /* Delay 200 usecs (min) */
  206. /*--------------------------------------------------------------------
  207. * Enable the controller, then wait for DCEN to complete
  208. *------------------------------------------------------------------*/
  209. mtsdram (mem_cfg0, 0x86000000); /* DCEN=1, PMUD=1, 64-bit */
  210. for (;;) {
  211. mfsdram (mem_mcsts, reg);
  212. if (reg & 0x80000000)
  213. break;
  214. }
  215. return (128 * 1024 * 1024); /* 128 MB */
  216. }
  217. #endif /* !defined(CONFIG_SPD_EEPROM) */
  218. /*************************************************************************
  219. * pci_pre_init
  220. *
  221. * This routine is called just prior to registering the hose and gives
  222. * the board the opportunity to check things. Returning a value of zero
  223. * indicates that things are bad & PCI initialization should be aborted.
  224. *
  225. * Different boards may wish to customize the pci controller structure
  226. * (add regions, override default access routines, etc) or perform
  227. * certain pre-initialization actions.
  228. *
  229. ************************************************************************/
  230. #if defined(CONFIG_PCI) && defined(CFG_PCI_PRE_INIT)
  231. int pci_pre_init(struct pci_controller * hose )
  232. {
  233. unsigned long strap;
  234. /*--------------------------------------------------------------------------+
  235. * The ocotea board is always configured as the host & requires the
  236. * PCI arbiter to be enabled.
  237. *--------------------------------------------------------------------------*/
  238. mfsdr(sdr_sdstp1, strap);
  239. if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){
  240. printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
  241. return 0;
  242. }
  243. return 1;
  244. }
  245. #endif /* defined(CONFIG_PCI) && defined(CFG_PCI_PRE_INIT) */
  246. /*************************************************************************
  247. * pci_target_init
  248. *
  249. * The bootstrap configuration provides default settings for the pci
  250. * inbound map (PIM). But the bootstrap config choices are limited and
  251. * may not be sufficient for a given board.
  252. *
  253. ************************************************************************/
  254. #if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
  255. void pci_target_init(struct pci_controller * hose )
  256. {
  257. DECLARE_GLOBAL_DATA_PTR;
  258. /*--------------------------------------------------------------------------+
  259. * Disable everything
  260. *--------------------------------------------------------------------------*/
  261. out32r( PCIX0_PIM0SA, 0 ); /* disable */
  262. out32r( PCIX0_PIM1SA, 0 ); /* disable */
  263. out32r( PCIX0_PIM2SA, 0 ); /* disable */
  264. out32r( PCIX0_EROMBA, 0 ); /* disable expansion rom */
  265. /*--------------------------------------------------------------------------+
  266. * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping
  267. * options to not support sizes such as 128/256 MB.
  268. *--------------------------------------------------------------------------*/
  269. out32r( PCIX0_PIM0LAL, CFG_SDRAM_BASE );
  270. out32r( PCIX0_PIM0LAH, 0 );
  271. out32r( PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1 );
  272. out32r( PCIX0_BAR0, 0 );
  273. /*--------------------------------------------------------------------------+
  274. * Program the board's subsystem id/vendor id
  275. *--------------------------------------------------------------------------*/
  276. out16r( PCIX0_SBSYSVID, CFG_PCI_SUBSYS_VENDORID );
  277. out16r( PCIX0_SBSYSID, CFG_PCI_SUBSYS_DEVICEID );
  278. out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY );
  279. }
  280. #endif /* defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) */
  281. /*************************************************************************
  282. * is_pci_host
  283. *
  284. * This routine is called to determine if a pci scan should be
  285. * performed. With various hardware environments (especially cPCI and
  286. * PPMC) it's insufficient to depend on the state of the arbiter enable
  287. * bit in the strap register, or generic host/adapter assumptions.
  288. *
  289. * Rather than hard-code a bad assumption in the general 440 code, the
  290. * 440 pci code requires the board to decide at runtime.
  291. *
  292. * Return 0 for adapter mode, non-zero for host (monarch) mode.
  293. *
  294. *
  295. ************************************************************************/
  296. #if defined(CONFIG_PCI)
  297. int is_pci_host(struct pci_controller *hose)
  298. {
  299. /* The ocotea board is always configured as host. */
  300. return(1);
  301. }
  302. #endif /* defined(CONFIG_PCI) */
  303. void fpga_init(void)
  304. {
  305. unsigned long group;
  306. unsigned long sdr0_pfc0;
  307. unsigned long sdr0_pfc1;
  308. unsigned long sdr0_cust0;
  309. unsigned long pvr;
  310. mfsdr (sdr_pfc0, sdr0_pfc0);
  311. mfsdr (sdr_pfc1, sdr0_pfc1);
  312. group = SDR0_PFC1_EPS_DECODE(sdr0_pfc1);
  313. pvr = get_pvr ();
  314. sdr0_pfc0 = (sdr0_pfc0 & ~SDR0_PFC0_GEIE_MASK) | SDR0_PFC0_GEIE_TRE;
  315. if ( ((pvr == PVR_440GX_RA) || (pvr == PVR_440GX_RB)) && ((group == 4) || (group == 5))) {
  316. sdr0_pfc0 = (sdr0_pfc0 & ~SDR0_PFC0_TRE_MASK) | SDR0_PFC0_TRE_DISABLE;
  317. sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_CTEMS_MASK) | SDR0_PFC1_CTEMS_EMS;
  318. out8(FPGA_REG2, (in8(FPGA_REG2) & ~FPGA_REG2_EXT_INTFACE_MASK) |
  319. FPGA_REG2_EXT_INTFACE_ENABLE);
  320. mtsdr (sdr_pfc0, sdr0_pfc0);
  321. mtsdr (sdr_pfc1, sdr0_pfc1);
  322. } else {
  323. sdr0_pfc0 = (sdr0_pfc0 & ~SDR0_PFC0_TRE_MASK) | SDR0_PFC0_TRE_ENABLE;
  324. switch (group)
  325. {
  326. case 0:
  327. case 1:
  328. case 2:
  329. /* CPU trace A */
  330. out8(FPGA_REG2, (in8(FPGA_REG2) & ~FPGA_REG2_EXT_INTFACE_MASK) |
  331. FPGA_REG2_EXT_INTFACE_ENABLE);
  332. sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_CTEMS_MASK) | SDR0_PFC1_CTEMS_EMS;
  333. mtsdr (sdr_pfc0, sdr0_pfc0);
  334. mtsdr (sdr_pfc1, sdr0_pfc1);
  335. break;
  336. case 3:
  337. case 4:
  338. case 5:
  339. case 6:
  340. /* CPU trace B - Over EBMI */
  341. sdr0_pfc1 = (sdr0_pfc1 & ~SDR0_PFC1_CTEMS_MASK) | SDR0_PFC1_CTEMS_CPUTRACE;
  342. mtsdr (sdr_pfc0, sdr0_pfc0);
  343. mtsdr (sdr_pfc1, sdr0_pfc1);
  344. out8(FPGA_REG2, (in8(FPGA_REG2) & ~FPGA_REG2_EXT_INTFACE_MASK) |
  345. FPGA_REG2_EXT_INTFACE_DISABLE);
  346. break;
  347. }
  348. }
  349. /* Initialize the ethernet specific functions in the fpga */
  350. mfsdr(sdr_pfc1, sdr0_pfc1);
  351. mfsdr(sdr_cust0, sdr0_cust0);
  352. if ( (SDR0_PFC1_EPS_DECODE(sdr0_pfc1) == 4) &&
  353. ((SDR0_CUST0_RGMII2_DECODE(sdr0_cust0) == RGMII_FER_GMII) ||
  354. (SDR0_CUST0_RGMII2_DECODE(sdr0_cust0) == RGMII_FER_TBI)))
  355. {
  356. if ((in8(FPGA_REG0) & FPGA_REG0_ECLS_MASK) == FPGA_REG0_ECLS_VER1)
  357. {
  358. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_ENET_MASK1) |
  359. FPGA_REG3_ENET_GROUP7);
  360. }
  361. else
  362. {
  363. if (SDR0_CUST0_RGMII2_DECODE(sdr0_cust0) == RGMII_FER_GMII)
  364. {
  365. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_ENET_MASK2) |
  366. FPGA_REG3_ENET_GROUP7);
  367. }
  368. else
  369. {
  370. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_ENET_MASK2) |
  371. FPGA_REG3_ENET_GROUP8);
  372. }
  373. }
  374. }
  375. else
  376. {
  377. if ((in8(FPGA_REG0) & FPGA_REG0_ECLS_MASK) == FPGA_REG0_ECLS_VER1)
  378. {
  379. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_ENET_MASK1) |
  380. FPGA_REG3_ENET_ENCODE1(SDR0_PFC1_EPS_DECODE(sdr0_pfc1)));
  381. }
  382. else
  383. {
  384. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_ENET_MASK2) |
  385. FPGA_REG3_ENET_ENCODE2(SDR0_PFC1_EPS_DECODE(sdr0_pfc1)));
  386. }
  387. }
  388. out8(FPGA_REG4, FPGA_REG4_GPHY_MODE10 |
  389. FPGA_REG4_GPHY_MODE100 | FPGA_REG4_GPHY_MODE1000 |
  390. FPGA_REG4_GPHY_FRC_DPLX | FPGA_REG4_CONNECT_PHYS);
  391. /* reset the gigabyte phy if necessary */
  392. if (SDR0_PFC1_EPS_DECODE(sdr0_pfc1) >= 3)
  393. {
  394. if ((in8(FPGA_REG0) & FPGA_REG0_ECLS_MASK) == FPGA_REG0_ECLS_VER1)
  395. {
  396. out8(FPGA_REG3, in8(FPGA_REG3) & ~FPGA_REG3_GIGABIT_RESET_DISABLE);
  397. udelay(10000);
  398. out8(FPGA_REG3, in8(FPGA_REG3) | FPGA_REG3_GIGABIT_RESET_DISABLE);
  399. }
  400. else
  401. {
  402. out8(FPGA_REG2, in8(FPGA_REG2) & ~FPGA_REG2_GIGABIT_RESET_DISABLE);
  403. udelay(10000);
  404. out8(FPGA_REG2, in8(FPGA_REG2) | FPGA_REG2_GIGABIT_RESET_DISABLE);
  405. }
  406. }
  407. /* Turn off the LED's */
  408. out8(FPGA_REG3, (in8(FPGA_REG3) & ~FPGA_REG3_STAT_MASK) |
  409. FPGA_REG3_STAT_LED8_DISAB | FPGA_REG3_STAT_LED4_DISAB |
  410. FPGA_REG3_STAT_LED2_DISAB | FPGA_REG3_STAT_LED1_DISAB);
  411. return;
  412. }
  413. #ifdef CONFIG_POST
  414. /*
  415. * Returns 1 if keys pressed to start the power-on long-running tests
  416. * Called from board_init_f().
  417. */
  418. int post_hotkeys_pressed(void)
  419. {
  420. return (ctrlc());
  421. }
  422. #endif