/* ************************************************************************************************************ * * function * * name : * * parmeters : * * return : * * note : * * ************************************************************************************************************ */ void sunxi_update_subsequent_processing(int next_work) { printf("next work %d\n", next_work); switch(next_work) { case SUNXI_UPDATE_NEXT_ACTION_REBOOT: //重启 case SUNXI_UPDATA_NEXT_ACTION_SPRITE_TEST: printf("SUNXI_UPDATE_NEXT_ACTION_REBOOT\n"); //do_reset(NULL, 0, 0, NULL); sunxi_board_restart(0); break; case SUNXI_UPDATE_NEXT_ACTION_SHUTDOWN: //关机 printf("SUNXI_UPDATE_NEXT_ACTION_SHUTDOWN\n"); //do_shutdown(NULL, 0, 0, NULL); sunxi_board_shutdown(); break; case SUNXI_UPDATE_NEXT_ACTION_REUPDATE: printf("SUNXI_UPDATE_NEXT_ACTION_REUPDATE\n"); sunxi_board_run_fel(); //进行量产 break; case SUNXI_UPDATE_NEXT_ACTION_BOOT: case SUNXI_UPDATE_NEXT_ACTION_NORMAL: default: printf("SUNXI_UPDATE_NEXT_ACTION_NULL\n"); break; } return ; }
/* ******************************************************************************* * __fastboot_reboot * * Description: * void * * Parameters: * void * * Return value: * void * * note: * void * ******************************************************************************* */ static int __fastboot_reboot(int word_mode) { char response[8]; sprintf(response,"OKAY"); __sunxi_fastboot_send_status(response, strlen(response)); __msdelay(1000); /* 1 sec */ sunxi_board_restart(word_mode); return 0; }
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { puts ("resetting ...\n"); udelay (50000); /* wait 50 ms */ debug("delayed\n"); #ifndef CONFIG_ALLWINNER disable_interrupts(); sunxi_flash_exit(1); debug("disable interrupts\n"); reset_cpu(0); #else sunxi_board_restart(0); #endif /*NOTREACHED*/ return 0; }