This commit is contained in:
刘可亮
2024-06-04 19:00:30 +08:00
parent 990c72f5be
commit 0a13af6a1d
1668 changed files with 342810 additions and 37726 deletions

View File

@@ -4,6 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <string.h>
#include "aic_core.h"
#include "aic_reboot_reason.h"
@@ -12,6 +13,7 @@ int drv_wri_init(void)
/* From WRI V1.2, the follow API is defined in WRI instead of RTC */
#if defined(AIC_WRI_DRV_V12) || defined(AIC_RTC_DRV_V10) || defined(AIC_RTC_DRV_V11)
aic_get_reboot_reason();
aic_clr_reboot_reason();
aic_show_startup_time();
#endif
return 0;
@@ -27,7 +29,10 @@ void cmd_reboot(int argc, char **argv);
static void cmd_aicupg(int argc, char **argv)
{
aic_set_reboot_reason(REBOOT_REASON_UPGRADE);
if ((argc == 2) && !strcmp(argv[1], "gotobl"))
aic_set_reboot_reason(REBOOT_REASON_BL_UPGRADE);
else
aic_set_reboot_reason(REBOOT_REASON_UPGRADE);
#ifdef AIC_USING_WDT
cmd_reboot(0, NULL);
#endif