board.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. /*
  2. * (C) Copyright 2003
  3. * Josef Baumgartner <josef.baumgartner@telex.de>
  4. *
  5. * (C) Copyright 2000-2002
  6. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #include <common.h>
  27. #include <watchdog.h>
  28. #include <command.h>
  29. #include <malloc.h>
  30. #include <stdio_dev.h>
  31. #include <linux/compiler.h>
  32. #include <asm/immap.h>
  33. #if defined(CONFIG_CMD_IDE)
  34. #include <ide.h>
  35. #endif
  36. #if defined(CONFIG_CMD_SCSI)
  37. #include <scsi.h>
  38. #endif
  39. #if defined(CONFIG_CMD_KGDB)
  40. #include <kgdb.h>
  41. #endif
  42. #ifdef CONFIG_STATUS_LED
  43. #include <status_led.h>
  44. #endif
  45. #include <net.h>
  46. #include <serial.h>
  47. #if defined(CONFIG_CMD_BEDBUG)
  48. #include <cmd_bedbug.h>
  49. #endif
  50. #ifdef CONFIG_SYS_ALLOC_DPRAM
  51. #include <commproc.h>
  52. #endif
  53. #include <version.h>
  54. #if defined(CONFIG_HARD_I2C) || \
  55. defined(CONFIG_SOFT_I2C)
  56. #include <i2c.h>
  57. #endif
  58. #ifdef CONFIG_CMD_SPI
  59. #include <spi.h>
  60. #endif
  61. #ifdef CONFIG_BITBANGMII
  62. #include <miiphy.h>
  63. #endif
  64. #include <nand.h>
  65. DECLARE_GLOBAL_DATA_PTR;
  66. static char *failed = "*** failed ***\n";
  67. #include <environment.h>
  68. extern ulong __init_end;
  69. extern ulong __bss_end;
  70. #if defined(CONFIG_WATCHDOG)
  71. # undef INIT_FUNC_WATCHDOG_INIT
  72. # define INIT_FUNC_WATCHDOG_INIT watchdog_init,
  73. # define WATCHDOG_DISABLE watchdog_disable
  74. extern int watchdog_init(void);
  75. extern int watchdog_disable(void);
  76. #else
  77. # define INIT_FUNC_WATCHDOG_INIT /* undef */
  78. # define WATCHDOG_DISABLE /* undef */
  79. #endif /* CONFIG_WATCHDOG */
  80. ulong monitor_flash_len;
  81. /************************************************************************
  82. * Utilities *
  83. ************************************************************************
  84. */
  85. /*
  86. * All attempts to come up with a "common" initialization sequence
  87. * that works for all boards and architectures failed: some of the
  88. * requirements are just _too_ different. To get rid of the resulting
  89. * mess of board dependend #ifdef'ed code we now make the whole
  90. * initialization sequence configurable to the user.
  91. *
  92. * The requirements for any new initalization function is simple: it
  93. * receives a pointer to the "global data" structure as it's only
  94. * argument, and returns an integer return code, where 0 means
  95. * "continue" and != 0 means "fatal error, hang the system".
  96. */
  97. typedef int (init_fnc_t) (void);
  98. /************************************************************************
  99. * Init Utilities
  100. ************************************************************************
  101. * Some of this code should be moved into the core functions,
  102. * but let's get it working (again) first...
  103. */
  104. static int init_baudrate (void)
  105. {
  106. gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE);
  107. return 0;
  108. }
  109. /***********************************************************************/
  110. static int init_func_ram (void)
  111. {
  112. int board_type = 0; /* use dummy arg */
  113. puts ("DRAM: ");
  114. if ((gd->ram_size = initdram (board_type)) > 0) {
  115. print_size (gd->ram_size, "\n");
  116. return (0);
  117. }
  118. puts (failed);
  119. return (1);
  120. }
  121. /***********************************************************************/
  122. #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
  123. static int init_func_i2c (void)
  124. {
  125. puts ("I2C: ");
  126. i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
  127. puts ("ready\n");
  128. return (0);
  129. }
  130. #endif
  131. #if defined(CONFIG_HARD_SPI)
  132. static int init_func_spi (void)
  133. {
  134. puts ("SPI: ");
  135. spi_init ();
  136. puts ("ready\n");
  137. return (0);
  138. }
  139. #endif
  140. /***********************************************************************/
  141. /************************************************************************
  142. * Initialization sequence *
  143. ************************************************************************
  144. */
  145. init_fnc_t *init_sequence[] = {
  146. get_clocks,
  147. env_init,
  148. init_baudrate,
  149. serial_init,
  150. console_init_f,
  151. display_options,
  152. checkcpu,
  153. checkboard,
  154. #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
  155. init_func_i2c,
  156. #endif
  157. #if defined(CONFIG_HARD_SPI)
  158. init_func_spi,
  159. #endif
  160. init_func_ram,
  161. #if defined(CONFIG_SYS_DRAM_TEST)
  162. testdram,
  163. #endif /* CONFIG_SYS_DRAM_TEST */
  164. INIT_FUNC_WATCHDOG_INIT
  165. NULL, /* Terminate this list */
  166. };
  167. /************************************************************************
  168. *
  169. * This is the first part of the initialization sequence that is
  170. * implemented in C, but still running from ROM.
  171. *
  172. * The main purpose is to provide a (serial) console interface as
  173. * soon as possible (so we can see any error messages), and to
  174. * initialize the RAM so that we can relocate the monitor code to
  175. * RAM.
  176. *
  177. * Be aware of the restrictions: global data is read-only, BSS is not
  178. * initialized, and stack space is limited to a few kB.
  179. *
  180. ************************************************************************
  181. */
  182. void
  183. board_init_f (ulong bootflag)
  184. {
  185. bd_t *bd;
  186. ulong len, addr, addr_sp;
  187. ulong *paddr;
  188. gd_t *id;
  189. init_fnc_t **init_fnc_ptr;
  190. #ifdef CONFIG_PRAM
  191. ulong reg;
  192. #endif
  193. /* Pointer is writable since we allocated a register for it */
  194. gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
  195. /* compiler optimization barrier needed for GCC >= 3.4 */
  196. __asm__ __volatile__("": : :"memory");
  197. /* Clear initial global data */
  198. memset ((void *) gd, 0, sizeof (gd_t));
  199. for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
  200. if ((*init_fnc_ptr)() != 0) {
  201. hang ();
  202. }
  203. }
  204. /*
  205. * Now that we have DRAM mapped and working, we can
  206. * relocate the code and continue running from DRAM.
  207. *
  208. * Reserve memory at end of RAM for (top down in that order):
  209. * - protected RAM
  210. * - LCD framebuffer
  211. * - monitor code
  212. * - board info struct
  213. */
  214. len = (ulong)&__bss_end - CONFIG_SYS_MONITOR_BASE;
  215. addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
  216. #ifdef CONFIG_LOGBUFFER
  217. /* reserve kernel log buffer */
  218. addr -= (LOGBUFF_RESERVE);
  219. debug ("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, addr);
  220. #endif
  221. #ifdef CONFIG_PRAM
  222. /*
  223. * reserve protected RAM
  224. */
  225. reg = getenv_ulong("pram", 10, CONFIG_PRAM);
  226. addr -= (reg << 10); /* size is in kB */
  227. debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
  228. #endif /* CONFIG_PRAM */
  229. /* round down to next 4 kB limit */
  230. addr &= ~(4096 - 1);
  231. debug ("Top of RAM usable for U-Boot at: %08lx\n", addr);
  232. #ifdef CONFIG_LCD
  233. #ifdef CONFIG_FB_ADDR
  234. gd->fb_base = CONFIG_FB_ADDR;
  235. #else
  236. /* reserve memory for LCD display (always full pages) */
  237. addr = lcd_setmem (addr);
  238. gd->fb_base = addr;
  239. #endif /* CONFIG_FB_ADDR */
  240. #endif /* CONFIG_LCD */
  241. /*
  242. * reserve memory for U-Boot code, data & bss
  243. * round down to next 4 kB limit
  244. */
  245. addr -= len;
  246. addr &= ~(4096 - 1);
  247. debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);
  248. /*
  249. * reserve memory for malloc() arena
  250. */
  251. addr_sp = addr - TOTAL_MALLOC_LEN;
  252. debug ("Reserving %dk for malloc() at: %08lx\n",
  253. TOTAL_MALLOC_LEN >> 10, addr_sp);
  254. /*
  255. * (permanently) allocate a Board Info struct
  256. * and a permanent copy of the "global" data
  257. */
  258. addr_sp -= sizeof (bd_t);
  259. bd = (bd_t *) addr_sp;
  260. gd->bd = bd;
  261. debug ("Reserving %zu Bytes for Board Info at: %08lx\n",
  262. sizeof (bd_t), addr_sp);
  263. addr_sp -= sizeof (gd_t);
  264. id = (gd_t *) addr_sp;
  265. debug ("Reserving %zu Bytes for Global Data at: %08lx\n",
  266. sizeof (gd_t), addr_sp);
  267. /* Reserve memory for boot params. */
  268. addr_sp -= CONFIG_SYS_BOOTPARAMS_LEN;
  269. bd->bi_boot_params = addr_sp;
  270. debug ("Reserving %dk for boot parameters at: %08lx\n",
  271. CONFIG_SYS_BOOTPARAMS_LEN >> 10, addr_sp);
  272. /*
  273. * Finally, we set up a new (bigger) stack.
  274. *
  275. * Leave some safety gap for SP, force alignment on 16 byte boundary
  276. * Clear initial stack frame
  277. */
  278. addr_sp -= 16;
  279. addr_sp &= ~0xF;
  280. paddr = (ulong *)addr_sp;
  281. *paddr-- = 0;
  282. *paddr-- = 0;
  283. addr_sp = (ulong)paddr;
  284. debug ("Stack Pointer at: %08lx\n", addr_sp);
  285. /*
  286. * Save local variables to board info struct
  287. */
  288. bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; /* start of DRAM memory */
  289. bd->bi_memsize = gd->ram_size; /* size of DRAM memory in bytes */
  290. #ifdef CONFIG_SYS_INIT_RAM_ADDR
  291. bd->bi_sramstart = CONFIG_SYS_INIT_RAM_ADDR; /* start of SRAM memory */
  292. bd->bi_sramsize = CONFIG_SYS_INIT_RAM_SIZE; /* size of SRAM memory */
  293. #endif
  294. bd->bi_mbar_base = CONFIG_SYS_MBAR; /* base of internal registers */
  295. bd->bi_bootflags = bootflag; /* boot / reboot flag (for LynxOS) */
  296. WATCHDOG_RESET ();
  297. bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */
  298. bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */
  299. #ifdef CONFIG_PCI
  300. bd->bi_pcifreq = gd->pci_clk; /* PCI Freq in Hz */
  301. #endif
  302. #ifdef CONFIG_EXTRA_CLOCK
  303. bd->bi_inpfreq = gd->arch.inp_clk; /* input Freq in Hz */
  304. bd->bi_vcofreq = gd->arch.vco_clk; /* vco Freq in Hz */
  305. bd->bi_flbfreq = gd->arch.flb_clk; /* flexbus Freq in Hz */
  306. #endif
  307. bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
  308. #ifdef CONFIG_SYS_EXTBDINFO
  309. strncpy (bd->bi_s_version, "1.2", sizeof (bd->bi_s_version));
  310. strncpy (bd->bi_r_version, U_BOOT_VERSION, sizeof (bd->bi_r_version));
  311. #endif
  312. WATCHDOG_RESET ();
  313. #ifdef CONFIG_POST
  314. post_bootmode_init();
  315. post_run (NULL, POST_ROM | post_bootmode_get(0));
  316. #endif
  317. WATCHDOG_RESET();
  318. memcpy (id, (void *)gd, sizeof (gd_t));
  319. debug ("Start relocate of code from %08x to %08lx\n", CONFIG_SYS_MONITOR_BASE, addr);
  320. relocate_code (addr_sp, id, addr);
  321. /* NOTREACHED - jump_to_ram() does not return */
  322. }
  323. /************************************************************************
  324. *
  325. * This is the next part if the initialization sequence: we are now
  326. * running from RAM and have a "normal" C environment, i. e. global
  327. * data can be written, BSS has been cleared, the stack size in not
  328. * that critical any more, etc.
  329. *
  330. ************************************************************************
  331. */
  332. void board_init_r (gd_t *id, ulong dest_addr)
  333. {
  334. char *s __maybe_unused;
  335. bd_t *bd;
  336. #ifndef CONFIG_ENV_IS_NOWHERE
  337. extern char * env_name_spec;
  338. #endif
  339. #ifndef CONFIG_SYS_NO_FLASH
  340. ulong flash_size;
  341. #endif
  342. gd = id; /* initialize RAM version of global data */
  343. bd = gd->bd;
  344. gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
  345. debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr);
  346. WATCHDOG_RESET ();
  347. gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE;
  348. serial_initialize();
  349. monitor_flash_len = (ulong)&__init_end - dest_addr;
  350. #if defined(CONFIG_NEEDS_MANUAL_RELOC)
  351. /*
  352. * We have to relocate the command table manually
  353. */
  354. fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
  355. ll_entry_count(cmd_tbl_t, cmd));
  356. #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
  357. /* there are some other pointer constants we must deal with */
  358. #ifndef CONFIG_ENV_IS_NOWHERE
  359. env_name_spec += gd->reloc_off;
  360. #endif
  361. WATCHDOG_RESET ();
  362. #ifdef CONFIG_LOGBUFFER
  363. logbuff_init_ptrs ();
  364. #endif
  365. #ifdef CONFIG_POST
  366. post_output_backlog ();
  367. post_reloc ();
  368. #endif
  369. WATCHDOG_RESET();
  370. #if 0
  371. /* instruction cache enabled in cpu_init_f() for faster relocation */
  372. icache_enable (); /* it's time to enable the instruction cache */
  373. #endif
  374. /*
  375. * Setup trap handlers
  376. */
  377. trap_init (CONFIG_SYS_SDRAM_BASE);
  378. /* The Malloc area is immediately below the monitor copy in DRAM */
  379. mem_malloc_init (CONFIG_SYS_MONITOR_BASE + gd->reloc_off -
  380. TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN);
  381. #if !defined(CONFIG_SYS_NO_FLASH)
  382. puts ("Flash: ");
  383. if ((flash_size = flash_init ()) > 0) {
  384. # ifdef CONFIG_SYS_FLASH_CHECKSUM
  385. print_size (flash_size, "");
  386. /*
  387. * Compute and print flash CRC if flashchecksum is set to 'y'
  388. *
  389. * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
  390. */
  391. if (getenv_yesno("flashchecksum") == 1) {
  392. printf (" CRC: %08X",
  393. crc32 (0,
  394. (const unsigned char *) CONFIG_SYS_FLASH_BASE,
  395. flash_size)
  396. );
  397. }
  398. putc ('\n');
  399. # else /* !CONFIG_SYS_FLASH_CHECKSUM */
  400. print_size (flash_size, "\n");
  401. # endif /* CONFIG_SYS_FLASH_CHECKSUM */
  402. } else {
  403. puts (failed);
  404. hang ();
  405. }
  406. bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; /* update start of FLASH memory */
  407. bd->bi_flashsize = flash_size; /* size of FLASH memory (final value) */
  408. bd->bi_flashoffset = 0;
  409. #else /* CONFIG_SYS_NO_FLASH */
  410. bd->bi_flashsize = 0;
  411. bd->bi_flashstart = 0;
  412. bd->bi_flashoffset = 0;
  413. #endif /* !CONFIG_SYS_NO_FLASH */
  414. WATCHDOG_RESET ();
  415. /* initialize higher level parts of CPU like time base and timers */
  416. cpu_init_r ();
  417. WATCHDOG_RESET ();
  418. #ifdef CONFIG_SPI
  419. # if !defined(CONFIG_ENV_IS_IN_EEPROM)
  420. spi_init_f ();
  421. # endif
  422. spi_init_r ();
  423. #endif
  424. /* relocate environment function pointers etc. */
  425. env_relocate ();
  426. WATCHDOG_RESET ();
  427. #if defined(CONFIG_PCI)
  428. /*
  429. * Do pci configuration
  430. */
  431. pci_init ();
  432. #endif
  433. /** leave this here (after malloc(), environment and PCI are working) **/
  434. /* Initialize stdio devices */
  435. stdio_init ();
  436. /* Initialize the jump table for applications */
  437. jumptable_init ();
  438. /* Initialize the console (after the relocation and devices init) */
  439. console_init_r ();
  440. #if defined(CONFIG_MISC_INIT_R)
  441. /* miscellaneous platform dependent initialisations */
  442. misc_init_r ();
  443. #endif
  444. #if defined(CONFIG_CMD_KGDB)
  445. WATCHDOG_RESET ();
  446. puts ("KGDB: ");
  447. kgdb_init ();
  448. #endif
  449. debug ("U-Boot relocated to %08lx\n", dest_addr);
  450. /*
  451. * Enable Interrupts
  452. */
  453. interrupt_init ();
  454. /* Must happen after interrupts are initialized since
  455. * an irq handler gets installed
  456. */
  457. timer_init();
  458. #ifdef CONFIG_STATUS_LED
  459. status_led_set (STATUS_LED_BOOT, STATUS_LED_BLINKING);
  460. #endif
  461. udelay (20);
  462. /* Insert function pointers now that we have relocated the code */
  463. /* Initialize from environment */
  464. load_addr = getenv_ulong("loadaddr", 16, load_addr);
  465. WATCHDOG_RESET ();
  466. #if defined(CONFIG_CMD_DOC)
  467. WATCHDOG_RESET ();
  468. puts ("DOC: ");
  469. doc_init ();
  470. #endif
  471. #if defined(CONFIG_CMD_NAND)
  472. WATCHDOG_RESET ();
  473. puts ("NAND: ");
  474. nand_init(); /* go init the NAND */
  475. #endif
  476. #ifdef CONFIG_BITBANGMII
  477. bb_miiphy_init();
  478. #endif
  479. #if defined(CONFIG_CMD_NET)
  480. WATCHDOG_RESET();
  481. #if defined(FEC_ENET)
  482. eth_init(bd);
  483. #endif
  484. puts ("Net: ");
  485. eth_initialize (bd);
  486. #endif
  487. #ifdef CONFIG_POST
  488. post_run (NULL, POST_RAM | post_bootmode_get(0));
  489. #endif
  490. #if defined(CONFIG_CMD_PCMCIA) \
  491. && !defined(CONFIG_CMD_IDE)
  492. WATCHDOG_RESET ();
  493. puts ("PCMCIA:");
  494. pcmcia_init ();
  495. #endif
  496. #if defined(CONFIG_CMD_IDE)
  497. WATCHDOG_RESET ();
  498. puts ("IDE: ");
  499. ide_init ();
  500. #endif
  501. #ifdef CONFIG_LAST_STAGE_INIT
  502. WATCHDOG_RESET ();
  503. /*
  504. * Some parts can be only initialized if all others (like
  505. * Interrupts) are up and running (i.e. the PC-style ISA
  506. * keyboard).
  507. */
  508. last_stage_init ();
  509. #endif
  510. #if defined(CONFIG_CMD_BEDBUG)
  511. WATCHDOG_RESET ();
  512. bedbug_init ();
  513. #endif
  514. #if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER)
  515. /*
  516. * Export available size of memory for Linux,
  517. * taking into account the protected RAM at top of memory
  518. */
  519. {
  520. ulong pram = 0;
  521. char memsz[32];
  522. #ifdef CONFIG_PRAM
  523. pram = getenv_ulong("pram", 10, CONFIG_PRAM);
  524. #endif
  525. #ifdef CONFIG_LOGBUFFER
  526. /* Also take the logbuffer into account (pram is in kB) */
  527. pram += (LOGBUFF_LEN+LOGBUFF_OVERHEAD)/1024;
  528. #endif
  529. sprintf (memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
  530. setenv ("mem", memsz);
  531. }
  532. #endif
  533. #ifdef CONFIG_MODEM_SUPPORT
  534. {
  535. extern int do_mdm_init;
  536. do_mdm_init = gd->do_mdm_init;
  537. }
  538. #endif
  539. #ifdef CONFIG_WATCHDOG
  540. /* disable watchdog if environment is set */
  541. if ((s = getenv ("watchdog")) != NULL) {
  542. if (strncmp (s, "off", 3) == 0) {
  543. WATCHDOG_DISABLE ();
  544. }
  545. }
  546. #endif /* CONFIG_WATCHDOG*/
  547. /* Initialization complete - start the monitor */
  548. /* main_loop() can return to retry autoboot, if so just run it again. */
  549. for (;;) {
  550. WATCHDOG_RESET ();
  551. main_loop ();
  552. }
  553. /* NOTREACHED - no way out of command loop except booting */
  554. }