mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
Merge "ipqsoc: Skip reset in crash dump path."
This commit is contained in:
commit
7573271eb1
5 changed files with 32 additions and 7 deletions
|
|
@ -1,2 +1,6 @@
|
|||
config QCA_COMMON
|
||||
bool "QCA Common IPs"
|
||||
|
||||
config SKIP_RESET
|
||||
bool "Skip reset after crash dump"
|
||||
default n
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ void set_flash_secondary_type(qca_smem_flash_info_t *);
|
|||
void dump_func(unsigned int dump_level);
|
||||
int do_dumpqca_flash_data(const char *);
|
||||
int do_dumpqca_usb_data(unsigned int dump_level);
|
||||
void crashdump_exit(void);
|
||||
int apps_iscrashed(void);
|
||||
int ipq_read_tcsr_boot_misc(void);
|
||||
int set_uuid_bootargs(char *boot_args, char *part_name, int buflen, bool gpt_flag);
|
||||
|
|
|
|||
|
|
@ -763,6 +763,12 @@ static int do_boot_signedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const a
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKIP_RESET
|
||||
if (apps_iscrashed())
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This sys call will switch the CE1 channel to ADM usage
|
||||
* so that HLOS can use it.
|
||||
|
|
@ -946,6 +952,11 @@ static int do_boot_unsignedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SKIP_RESET
|
||||
if (apps_iscrashed())
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
if (ret < 0 || boot_os(1, arg) != CMD_RET_SUCCESS) {
|
||||
#ifdef CONFIG_USB_XHCI_IPQ
|
||||
ipq_board_usb_init();
|
||||
|
|
|
|||
|
|
@ -179,6 +179,15 @@ __weak int scm_set_boot_addr(bool enable_sec_core)
|
|||
return -1;
|
||||
}
|
||||
|
||||
__weak void crashdump_exit(void)
|
||||
{
|
||||
#ifdef CONFIG_SKIP_RESET
|
||||
run_command("bootipq", 0);
|
||||
#else
|
||||
reset_board();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int krait_release_secondary(void)
|
||||
{
|
||||
writel(0xa4, CPU1_APCS_SAW2_VCTL);
|
||||
|
|
@ -971,7 +980,7 @@ void dump_func(unsigned int dump_level)
|
|||
printf("Using serverip from env %s\n", serverip);
|
||||
} else {
|
||||
printf("\nServer ip not found, run dhcp or configure\n");
|
||||
goto reset;
|
||||
goto exit;
|
||||
}
|
||||
printf("Trying to ping server.....\n");
|
||||
snprintf(runcmd, sizeof(runcmd), "ping %s", serverip);
|
||||
|
|
@ -985,11 +994,11 @@ void dump_func(unsigned int dump_level)
|
|||
}
|
||||
if (ping_status != 1) {
|
||||
printf("Ping failed\n");
|
||||
goto reset;
|
||||
goto exit;
|
||||
}
|
||||
if (do_dumpqca_data(dump_level) == CMD_RET_FAILURE)
|
||||
printf("Crashdump saving failed!\n");
|
||||
goto reset;
|
||||
goto exit;
|
||||
} else {
|
||||
etime = get_timer_masked() + (10 * CONFIG_SYS_HZ);
|
||||
printf("\nHit any key within 10s to stop dump activity...");
|
||||
|
|
@ -1012,8 +1021,8 @@ void dump_func(unsigned int dump_level)
|
|||
/* reset the system, some images might not be loaded
|
||||
* when crashmagic is found
|
||||
*/
|
||||
reset:
|
||||
reset_board();
|
||||
exit:
|
||||
crashdump_exit();
|
||||
}
|
||||
#ifdef CONFIG_MTD_DEVICE
|
||||
|
||||
|
|
|
|||
|
|
@ -386,13 +386,13 @@ void autoboot_command(const char *s)
|
|||
if (s) {
|
||||
if (strncmp(s, "1", sizeof("1"))) {
|
||||
printf("\nError: Invalid variable dump_minimal \n");
|
||||
reset_board();
|
||||
crashdump_exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (s) {
|
||||
do_dumpqca_minimal_data(s);
|
||||
reset_board();
|
||||
crashdump_exit();
|
||||
}
|
||||
else
|
||||
dump_func(FULL_DUMP);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue