int do_fastboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int ret = 1; unsigned long val; /* Initialize the board specific support */ if (0 == fastboot_init(&interface)) { printf ("Fastboot entered...\n"); run_command("setgreenled 50", 0); fastboot_countdown = CFG_FASTBOOT_COUNTDOWN; /* If we got this far, we are a success */ ret = 0; val = getbootmode(); /* On disconnect or error, polling returns non zero */ /* Always delay for fastboot unless we're in bootmode 4002 * or using the "factory" cable */ if((0x4002 != val) && !(__raw_readl(0x48055138) & 0x00100000)){ while (fastboot_countdown) { if (!fastboot_confirmed) { fastboot_countdown--; } if (fastboot_poll()) break; /* if we're holding down the button to get into * recovery, don't wait for the fastboot timeout so we don't * accidentally power off. short circuit 49999/50000 times * through to keep from overwhelming the twl6030 */ if (!(fastboot_countdown % 50000) && (0 == twl6030_get_power_button_status())) { fastboot_wait_power_button_abort = 1; break; } } }else{ while (1) { if (fastboot_poll()) break; } } } /* Reset the board specific support */ fastboot_shutdown(); /* If we're in 4003, go on to OMAP boot over USB */ if(0x4003 == val){ printf ("setting boot sequence first to USB.\nreboot...\n"); set_SWBootingCfg(); } return ret; }
int do_fastboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int ret = 1; #if defined(CONFIG_MACH_BOWSER_SUBTYPE_TATE) unsigned long val; #endif /* Initialize the board specific support */ if (0 == fastboot_init(&interface)) { printf ("Fastboot entered...\n"); #if defined(CONFIG_FASTBOOT_COUNTDOWN) fastboot_countdown = CFG_FASTBOOT_COUNTDOWN; #endif /* If we got this far, we are a success */ ret = 0; #if defined(CONFIG_MACH_BOWSER_SUBTYPE_TATE) val = getbootmode(); #endif /* On disconnect or error, polling returns non zero */ #if defined(CONFIG_FASTBOOT_COUNTDOWN) if((3 == flag) ){ while (fastboot_countdown--) { if (fastboot_poll()) break; if (fastboot_confirmed == 1) { show_fastboot(); while (1) { if (fastboot_poll()) break; } } else { if (fastboot_poll()) break; } } }else{ show_fastboot(); while (1) { if (fastboot_poll()) break; } } #else show_fastboot(); while (1) { if (fastboot_poll()) break; } #endif } /* Reset the board specific support */ fastboot_shutdown(); #if defined(CONFIG_MACH_BOWSER_SUBTYPE_TATE) if(0x5 == val) { printf ("setting boot sequence first to USB.\nreboot...\n"); set_SWBootingCfg(); } #endif return ret; }