2 * Copyright (C) 2009 Texas Instruments Incorporated
5 * Heiko Schocher, DENX Software Engineering, hs@denx.de.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
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.
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., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <linux/mtd/nand.h>
29 #include <asm/arch/hardware.h>
30 #include <asm/arch/nand_defs.h>
31 #include <asm/arch/davinci_misc.h>
32 #ifdef CONFIG_DAVINCI_MMC
34 #include <asm/arch/sdmmc_defs.h>
37 DECLARE_GLOBAL_DATA_PTR;
39 #ifndef CONFIG_SPL_BUILD
40 static struct davinci_timer *timer =
41 (struct davinci_timer *)DAVINCI_TIMER3_BASE;
43 static unsigned long get_timer_val(void)
45 unsigned long now = readl(&timer->tim34);
50 static int timer_running(void)
52 return readl(&timer->tcr) &
53 (DV_TIMER_TCR_ENAMODE_MASK << DV_TIMER_TCR_ENAMODE34_SHIFT);
56 static void stop_timer(void)
58 writel(0x0, &timer->tcr);
64 printf("Board: AIT CAM ENC 4XX\n");
70 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
75 #ifdef CONFIG_DRIVER_TI_EMAC
76 static int cam_enc_4xx_check_network(void)
80 s = getenv("ethaddr");
84 if (!is_valid_ether_addr((const u8 *)s))
91 s = getenv("netmask");
95 s = getenv("serverip");
99 s = getenv("gatewayip");
105 int board_eth_init(bd_t *bis)
109 ret = cam_enc_4xx_check_network();
113 davinci_emac_initialize();
119 #ifdef CONFIG_NAND_DAVINCI
121 davinci_std_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
122 uint8_t *buf, int page)
124 struct nand_chip *this = mtd->priv;
125 int i, eccsize = chip->ecc.size;
126 int eccbytes = chip->ecc.bytes;
127 int eccsteps = chip->ecc.steps;
129 uint8_t *oob = chip->oob_poi;
131 chip->cmdfunc(mtd, NAND_CMD_READOOB, 0x0, page & this->pagemask);
133 chip->read_buf(mtd, oob, mtd->oobsize);
135 chip->cmdfunc(mtd, NAND_CMD_READ0, 0x0, page & this->pagemask);
138 for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
141 chip->ecc.hwctl(mtd, NAND_ECC_READ);
142 chip->read_buf(mtd, p, eccsize);
143 chip->ecc.hwctl(mtd, NAND_ECC_READSYN);
145 if (chip->ecc.prepad)
146 oob += chip->ecc.prepad;
148 stat = chip->ecc.correct(mtd, p, oob, NULL);
151 mtd->ecc_stats.failed++;
153 mtd->ecc_stats.corrected += stat;
157 if (chip->ecc.postpad)
158 oob += chip->ecc.postpad;
161 /* Calculate remaining oob bytes */
162 i = mtd->oobsize - (oob - chip->oob_poi);
164 chip->read_buf(mtd, oob, i);
169 static void davinci_std_write_page_syndrome(struct mtd_info *mtd,
170 struct nand_chip *chip, const uint8_t *buf)
172 unsigned char davinci_ecc_buf[NAND_MAX_OOBSIZE];
173 struct nand_chip *this = mtd->priv;
174 int i, eccsize = chip->ecc.size;
175 int eccbytes = chip->ecc.bytes;
176 int eccsteps = chip->ecc.steps;
177 int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
179 const uint8_t *p = buf;
180 uint8_t *oob = chip->oob_poi;
182 for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
183 chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
184 chip->write_buf(mtd, p, eccsize);
186 /* Calculate ECC without prepad */
187 chip->ecc.calculate(mtd, p, oob + chip->ecc.prepad);
189 if (chip->ecc.prepad) {
190 offset = (chip->ecc.steps - eccsteps) * chunk;
191 memcpy(&davinci_ecc_buf[offset], oob, chip->ecc.prepad);
192 oob += chip->ecc.prepad;
195 offset = ((chip->ecc.steps - eccsteps) * chunk) +
197 memcpy(&davinci_ecc_buf[offset], oob, eccbytes);
200 if (chip->ecc.postpad) {
201 offset = ((chip->ecc.steps - eccsteps) * chunk) +
202 chip->ecc.prepad + eccbytes;
203 memcpy(&davinci_ecc_buf[offset], oob,
205 oob += chip->ecc.postpad;
210 * Write the sparebytes into the page once
211 * all eccsteps have been covered
213 for (i = 0; i < mtd->oobsize; i++)
214 writeb(davinci_ecc_buf[i], this->IO_ADDR_W);
216 /* Calculate remaining oob bytes */
217 i = mtd->oobsize - (oob - chip->oob_poi);
219 chip->write_buf(mtd, oob, i);
222 static int davinci_std_write_oob_syndrome(struct mtd_info *mtd,
223 struct nand_chip *chip, int page)
226 const uint8_t *bufpoi = chip->oob_poi;
228 pos = mtd->writesize;
230 chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
232 chip->write_buf(mtd, bufpoi, mtd->oobsize);
234 chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
235 status = chip->waitfunc(mtd, chip);
237 return status & NAND_STATUS_FAIL ? -1 : 0;
240 static int davinci_std_read_oob_syndrome(struct mtd_info *mtd,
241 struct nand_chip *chip, int page, int sndcmd)
243 struct nand_chip *this = mtd->priv;
244 uint8_t *buf = chip->oob_poi;
245 uint8_t *bufpoi = buf;
247 chip->cmdfunc(mtd, NAND_CMD_READOOB, 0x0, page & this->pagemask);
249 chip->read_buf(mtd, bufpoi, mtd->oobsize);
254 static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip)
256 struct nand_chip *this = mtd->priv;
257 unsigned long wbase = (unsigned long) this->IO_ADDR_W;
258 unsigned long rbase = (unsigned long) this->IO_ADDR_R;
261 __set_bit(14, &wbase);
262 __set_bit(14, &rbase);
264 __clear_bit(14, &wbase);
265 __clear_bit(14, &rbase);
267 this->IO_ADDR_W = (void *)wbase;
268 this->IO_ADDR_R = (void *)rbase;
271 int board_nand_init(struct nand_chip *nand)
273 davinci_nand_init(nand);
274 nand->select_chip = nand_dm365evm_select_chip;
279 struct nand_ecc_ctrl org_ecc;
280 static int notsaved = 1;
282 static int nand_switch_hw_func(int mode)
284 struct nand_chip *nand;
285 struct mtd_info *mtd;
287 if (nand_curr_device < 0 ||
288 nand_curr_device >= CONFIG_SYS_MAX_NAND_DEVICE ||
289 !nand_info[nand_curr_device].name) {
290 printf("Error: Can't switch hw functions," \
291 " no devices available\n");
295 mtd = &nand_info[nand_curr_device];
300 printf("switching to uboot hw functions.\n");
301 memcpy(&nand->ecc, &org_ecc,
302 sizeof(struct nand_ecc_ctrl));
306 printf("switching to RBL hw functions.\n");
308 memcpy(&org_ecc, &nand->ecc,
309 sizeof(struct nand_ecc_ctrl));
312 nand->ecc.mode = NAND_ECC_HW_SYNDROME;
313 nand->ecc.prepad = 6;
314 nand->ecc.read_page = davinci_std_read_page_syndrome;
315 nand->ecc.write_page = davinci_std_write_page_syndrome;
316 nand->ecc.read_oob = davinci_std_read_oob_syndrome;
317 nand->ecc.write_oob = davinci_std_write_oob_syndrome;
324 static int do_switch_ecc(cmd_tbl_t *cmdtp, int flag, int argc,
329 if (strncmp(argv[1], "rbl", 2) == 0)
330 hwmode = nand_switch_hw_func(1);
331 else if (strncmp(argv[1], "uboot", 2) == 0)
332 hwmode = nand_switch_hw_func(0);
339 printf("Usage: nandrbl %s\n", cmdtp->usage);
344 nandrbl, 2, 1, do_switch_ecc,
345 "switch between rbl/uboot NAND ECC calculation algorithm",
346 "[rbl/uboot] - Switch between rbl/uboot NAND ECC algorithm"
350 #endif /* #ifdef CONFIG_NAND_DAVINCI */
352 #ifdef CONFIG_DAVINCI_MMC
353 static struct davinci_mmc mmc_sd0 = {
354 .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,
355 .input_clk = 121500000,
356 .host_caps = MMC_MODE_4BIT,
357 .voltages = MMC_VDD_32_33 | MMC_VDD_33_34,
358 .version = MMC_CTLR_VERSION_2,
361 int board_mmc_init(bd_t *bis)
365 /* Add slot-0 to mmc subsystem */
366 err = davinci_mmc_init(bis, &mmc_sd0);
372 int board_late_init(void)
374 struct davinci_gpio *gpio = davinci_gpio_bank45;
376 /* 24MHz InputClock / 15 prediv -> 1.6 MHz timer running */
377 while ((get_timer_val() < CONFIG_AIT_TIMER_TIMEOUT) &&
381 /* 1 sec reached -> stop timer, clear all LED */
383 clrbits_le32(&gpio->out_data, CONFIG_CAM_ENC_LED_MASK);
389 char *name = "GENERIC @ 0x00";
392 miiphy_reset(name, 0x0);
395 #else /* #ifndef CONFIG_SPL_BUILD */
396 static void cam_enc_4xx_set_all_led(void)
398 struct davinci_gpio *gpio = davinci_gpio_bank45;
400 setbits_le32(&gpio->out_data, CONFIG_CAM_ENC_LED_MASK);
404 * TIMER 0 is used for tick
406 static struct davinci_timer *timer =
407 (struct davinci_timer *)DAVINCI_TIMER3_BASE;
409 #define TIMER_LOAD_VAL 0xffffffff
410 #define TIM_CLK_DIV 16
412 static int cam_enc_4xx_timer_init(void)
414 /* We are using timer34 in unchained 32-bit mode, full speed */
415 writel(0x0, &timer->tcr);
416 writel(0x0, &timer->tgcr);
417 writel(0x06 | ((TIM_CLK_DIV - 1) << 8), &timer->tgcr);
418 writel(0x0, &timer->tim34);
419 writel(TIMER_LOAD_VAL, &timer->prd34);
420 writel(2 << 22, &timer->tcr);
424 void board_gpio_init(void)
426 struct davinci_gpio *gpio;
428 cam_enc_4xx_set_all_led();
429 cam_enc_4xx_timer_init();
430 gpio = davinci_gpio_bank01;
431 clrbits_le32(&gpio->dir, ~0xfdfffffe);
432 /* clear LED D14 = GPIO25 */
433 clrbits_le32(&gpio->out_data, 0x02000000);
434 gpio = davinci_gpio_bank23;
435 clrbits_le32(&gpio->dir, ~0x5ff0afef);
436 /* set GPIO61 to 1 -> intern UART0 as Console */
437 setbits_le32(&gpio->out_data, 0x20000000);
439 * PHY out of reset GIO 50 = 1
440 * NAND WP off GIO 51 = 1
442 setbits_le32(&gpio->out_data, 0x000c0004);
443 gpio = davinci_gpio_bank45;
444 clrbits_le32(&gpio->dir, ~(0xdb2fffff) | CONFIG_CAM_ENC_LED_MASK);
454 clrbits_le32(&gpio->out_data, CONFIG_CAM_ENC_LED_MASK);
455 gpio = davinci_gpio_bank67;
456 clrbits_le32(&gpio->dir, ~0x000007ff);
460 * functions for the post memory test.
462 int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
464 *vstart = CONFIG_SYS_SDRAM_BASE;
465 *size = PHYS_SDRAM_1_SIZE;
470 void arch_memory_failure_handle(void)
472 cam_enc_4xx_set_all_led();
473 puts("mem failure\n");
478 #if defined(CONFIG_MENU)
482 #define MENU_EXIT_BOOTCMD -2
485 #define MENU_UPDATE 2
486 #define MENU_NETWORK 3
489 static int menu_start;
491 #define FIT_SUBTYPE_UNKNOWN 0
492 #define FIT_SUBTYPE_UBL_HEADER 1
493 #define FIT_SUBTYPE_SPL_IMAGE 2
494 #define FIT_SUBTYPE_UBOOT_IMAGE 3
495 #define FIT_SUBTYPE_DF_ENV_IMAGE 4
496 #define FIT_SUBTYPE_RAMDISK_IMAGE 5
498 struct fit_images_info {
506 static struct fit_images_info images[10];
508 struct menu_display {
510 int timeout; /* in sec */
513 int (*menu_evaluate)(char *choice);
516 char *menu_main[] = {
518 "(2) Update Software",
519 "(3) Reset to default setting and boot",
520 "(4) Enter U-Boot console",
524 char *menu_update[] = {
525 "(1) Network settings",
531 char *menu_load[] = {
537 char *menu_network[] = {
542 "(5) tftp image name",
543 "(6) back to update software",
547 static void ait_menu_print(void *data)
549 printf("%s\n", (char *)data);
553 static char *menu_handle(struct menu_display *display)
563 m = menu_create(display->title, display->timeout, 1, ait_menu_print);
565 for (i = 0; display->menulist[i]; i++) {
566 sprintf(key, "%d", i + 1);
567 if (display->id == MENU_NETWORK) {
570 s = getenv("ipaddr");
573 s = getenv("netmask");
576 s = getenv("serverip");
579 s = getenv("gatewayip");
582 s = getenv("img_file");
589 sprintf(temp[i], "%s: %s",
590 display->menulist[i], s);
591 ret = menu_item_add(m, key, temp[i]);
593 ret = menu_item_add(m, key,
594 display->menulist[i]);
597 ret = menu_item_add(m, key, display->menulist[i]);
601 printf("failed to add item!");
606 sprintf(key, "%d", 1);
607 menu_default_set(m, key);
609 if (menu_get_choice(m, (void **)&choice) != 1)
610 debug("Problem picking a choice!\n");
617 static int ait_menu_show(struct menu_display *display, int bootdelay)
622 if ((menu_start == 0) && (display->id == MENU_MAIN))
623 display->timeout = bootdelay;
625 display->timeout = 0;
627 while (end == MENU_STAY) {
628 choice = menu_handle(display);
630 end = display->menu_evaluate(choice);
632 if (end == display->id)
634 if (display->id == MENU_MAIN) {
636 end = MENU_EXIT_BOOTCMD;
638 display->timeout = 0;
644 static int ait_writeublheader(void)
650 for (i = CONFIG_SYS_NAND_BLOCK_SIZE;
651 i < CONFIG_SYS_NAND_U_BOOT_OFFS;
652 i += CONFIG_SYS_NAND_BLOCK_SIZE) {
653 sprintf(s, "%lx", i);
654 ret = setenv("header_addr", s);
656 ret = run_command2("run img_writeheader", 0);
663 static int ait_menu_install_images(void)
671 * possible image types:
672 * FIT_SUBTYPE_UNKNOWN
673 * FIT_SUBTYPE_UBL_HEADER
674 * FIT_SUBTYPE_SPL_IMAGE
675 * FIT_SUBTYPE_UBOOT_IMAGE
676 * FIT_SUBTYPE_DF_ENV_IMAGE
677 * FIT_SUBTYPE_RAMDISK_IMAGE
680 * img_addr_r: image start addr
681 * header_addr: addr where to write to UBL header
682 * img_writeheader: write ubl header to nand
683 * img_writespl: write spl to nand
684 * img_writeuboot: write uboot to nand
685 * img_writedfenv: write default environment to ubi volume
686 * img_volume: which ubi volume should be updated with img_writeramdisk
687 * filesize: size of data for updating ubi volume
688 * img_writeramdisk: write ramdisk to ubi volume
691 while (images[count].type != IH_TYPE_INVALID) {
692 printf("Installing %s\n",
693 genimg_get_type_name(images[count].type));
694 sprintf(s, "%p", images[count].data);
695 setenv("img_addr_r", s);
696 sprintf(s, "%lx", (unsigned long)images[count].size);
697 setenv("filesize", s);
698 switch (images[count].subtype) {
699 case FIT_SUBTYPE_DF_ENV_IMAGE:
700 ret = run_command2("run img_writedfenv", 0);
702 case FIT_SUBTYPE_RAMDISK_IMAGE:
703 t = getenv("img_volume");
705 ret = setenv("img_volume", "rootfs1");
707 /* switch to other volume */
708 if (strncmp(t, "rootfs1", 7) == 0)
709 ret = setenv("img_volume", "rootfs2");
711 ret = setenv("img_volume", "rootfs1");
716 ret = run_command2("run img_writeramdisk", 0);
718 case FIT_SUBTYPE_SPL_IMAGE:
719 ret = run_command2("run img_writespl", 0);
721 case FIT_SUBTYPE_UBL_HEADER:
722 ret = ait_writeublheader();
724 case FIT_SUBTYPE_UBOOT_IMAGE:
725 ret = run_command2("run img_writeuboot", 0);
728 /* not supported type */
733 /* now save dvn_* and img_volume env vars to new values */
735 ret = run_command2("run savenewvers", 0);
740 static int ait_menu_evaluate_load(char *choice)
748 ait_menu_install_images();
751 /* cancel, back to main */
758 struct menu_display ait_load = {
759 .title = "AIT load image",
762 .menulist = menu_load,
763 .menu_evaluate = ait_menu_evaluate_load,
766 static void ait_menu_read_env(char *name)
768 char output[CONFIG_SYS_CBSIZE];
769 char cbuf[CONFIG_SYS_CBSIZE];
773 sprintf(output, "%s old: %s value: ", name, getenv(name));
774 memset(cbuf, 0, CONFIG_SYS_CBSIZE);
775 readret = readline_into_buffer(output, cbuf, 0);
778 ret = setenv(name, cbuf);
780 printf("Error setting %s\n", name);
787 static int ait_menu_evaluate_network(char *choice)
794 ait_menu_read_env("ipaddr");
797 ait_menu_read_env("netmask");
800 ait_menu_read_env("serverip");
803 ait_menu_read_env("gatewayip");
806 ait_menu_read_env("img_file");
816 struct menu_display ait_network = {
817 .title = "AIT network settings",
820 .menulist = menu_network,
821 .menu_evaluate = ait_menu_evaluate_network,
824 static int fit_get_subtype(const void *fit, int noffset, char **subtype)
828 *subtype = (char *)fdt_getprop(fit, noffset, "subtype", &len);
829 if (*subtype == NULL)
835 static int ait_subtype_nr(char *subtype)
837 int ret = FIT_SUBTYPE_UNKNOWN;
839 if (!strncmp("ublheader", subtype, strlen("ublheader")))
840 return FIT_SUBTYPE_UBL_HEADER;
841 if (!strncmp("splimage", subtype, strlen("splimage")))
842 return FIT_SUBTYPE_SPL_IMAGE;
843 if (!strncmp("ubootimage", subtype, strlen("ubootimage")))
844 return FIT_SUBTYPE_UBOOT_IMAGE;
845 if (!strncmp("dfenvimage", subtype, strlen("dfenvimage")))
846 return FIT_SUBTYPE_DF_ENV_IMAGE;
851 static int ait_menu_check_image(void)
854 unsigned long fit_addr;
865 int found_uboot = -1;
866 int found_ramdisk = -1;
868 memset(images, 0, sizeof(images));
869 s = getenv("fit_addr_r");
870 fit_addr = s ? (unsigned long)simple_strtol(s, NULL, 16) : \
871 CONFIG_BOARD_IMG_ADDR_R;
873 addr = (void *)fit_addr;
874 /* check if it is a FIT image */
875 format = genimg_get_format(addr);
876 if (format != IMAGE_FORMAT_FIT)
879 if (!fit_check_format(addr))
882 /* print the FIT description */
883 ret = fit_get_desc(addr, 0, &desc);
884 printf("FIT description: ");
886 printf("unavailable\n");
888 printf("%s\n", desc);
891 images_noffset = fdt_path_offset(addr, FIT_IMAGES_PATH);
892 if (images_noffset < 0) {
893 printf("Can't find images parent node '%s' (%s)\n",
894 FIT_IMAGES_PATH, fdt_strerror(images_noffset));
898 /* Process its subnodes, print out component images details */
899 for (ndepth = 0, count = 0,
900 noffset = fdt_next_node(addr, images_noffset, &ndepth);
901 (noffset >= 0) && (ndepth > 0);
902 noffset = fdt_next_node(addr, noffset, &ndepth)) {
905 * Direct child node of the images parent node,
906 * i.e. component image node.
908 printf("Image %u (%s)\n", count,
909 fit_get_name(addr, noffset, NULL));
911 fit_image_print(addr, noffset, "");
913 fit_image_get_type(addr, noffset,
914 &images[count].type);
915 /* Mandatory properties */
916 ret = fit_get_desc(addr, noffset, &desc);
917 printf("Description: ");
919 printf("unavailable\n");
921 printf("%s\n", desc);
923 ret = fit_get_subtype(addr, noffset, &subtype);
926 printf("unavailable\n");
928 images[count].subtype = ait_subtype_nr(subtype);
929 printf("%s %d\n", subtype,
930 images[count].subtype);
933 sprintf(images[count].desc, "%s", desc);
935 ret = fit_image_get_data(addr, noffset,
937 &images[count].size);
939 printf("Data Size: ");
941 printf("unavailable\n");
943 genimg_print_size(images[count].size);
944 printf("Data @ %p\n", images[count].data);
949 for (i = 0; i < count; i++) {
950 if (images[i].subtype == FIT_SUBTYPE_UBOOT_IMAGE)
952 if (images[i].type == IH_TYPE_RAMDISK) {
954 images[i].subtype = FIT_SUBTYPE_RAMDISK_IMAGE;
958 /* dvn_* env var update, if the FIT descriptors are different */
959 if (found_uboot >= 0) {
960 s = getenv("dvn_boot_vers");
962 ret = strcmp(s, images[found_uboot].desc);
964 setenv("dvn_boot_vers",
965 images[found_uboot].desc);
968 printf("no new uboot version\n");
971 setenv("dvn_boot_vers", images[found_uboot].desc);
974 if (found_ramdisk >= 0) {
975 s = getenv("dvn_app_vers");
977 ret = strcmp(s, images[found_ramdisk].desc);
979 setenv("dvn_app_vers",
980 images[found_ramdisk].desc);
983 printf("no new ramdisk version\n");
986 setenv("dvn_app_vers", images[found_ramdisk].desc);
989 if ((found_uboot == -1) && (found_ramdisk == -1))
995 static int ait_menu_evaluate_update(char *choice)
1002 switch (choice[1]) {
1004 return ait_menu_show(&ait_network, 0);
1008 ret = run_command2("run load_img", 0);
1009 printf("ret: %d\n", ret);
1013 ret = ait_menu_check_image();
1017 return ait_menu_show(&ait_load, 0);
1028 struct menu_display ait_update = {
1029 .title = "AIT Update Software",
1032 .menulist = menu_update,
1033 .menu_evaluate = ait_menu_evaluate_update,
1036 static int ait_menu_evaluate_main(char *choice)
1042 switch (choice[1]) {
1045 return MENU_EXIT_BOOTCMD;
1048 return ait_menu_show(&ait_update, 0);
1051 /* reset to default settings */
1052 setenv("app_reset", "yes");
1053 return MENU_EXIT_BOOTCMD;
1064 struct menu_display ait_main = {
1065 .title = "AIT Main",
1066 .timeout = CONFIG_BOOTDELAY,
1068 .menulist = menu_main,
1069 .menu_evaluate = ait_menu_evaluate_main,
1072 int menu_show(int bootdelay)
1076 run_command2("run saveparms", 0);
1077 ret = ait_menu_show(&ait_main, bootdelay);
1078 run_command2("run restoreparms", 0);
1080 if (ret == MENU_EXIT_BOOTCMD)
1086 void menu_display_statusline(struct menu *m)
1088 printf("State: dvn_boot_vers: %s dvn_app_vers: %s\n",
1089 getenv("dvn_boot_vers"), getenv("dvn_app_vers"));