mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq6018: Handle crashdump disabled case in reset flow
When crashdump is disabled, kernel will set the dload_magic as 0x40. When dload magic is 0x40, u-boot will clear the magic and do warm/cold reset. Change-Id: I4e5ed215419ba550776993f8a1772ad30f1a27e4 Signed-off-by: speriaka <speriaka@codeaurora.org>
This commit is contained in:
parent
3c7fc02e90
commit
98e4409f87
2 changed files with 21 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include <command.h>
|
||||
|
||||
#define DLOAD_MAGIC_COOKIE 0x10
|
||||
#define DLOAD_DISABLED 0x40
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
struct sdhci_host mmc_host;
|
||||
extern int ipq6018_edma_init(void *cfg);
|
||||
|
|
@ -775,6 +776,16 @@ __weak int ipq_get_tz_version(char *version_name, int buf_size)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int apps_iscrashed_crashdump_disabled(void)
|
||||
{
|
||||
u32 *dmagic = (u32 *)CONFIG_IPQ6018_DMAGIC_ADDR;
|
||||
|
||||
if (*dmagic == DLOAD_DISABLED)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int apps_iscrashed(void)
|
||||
{
|
||||
u32 *dmagic = (u32 *)CONFIG_IPQ6018_DMAGIC_ADDR;
|
||||
|
|
|
|||
|
|
@ -361,6 +361,11 @@ __weak int apps_iscrashed(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
__weak int apps_iscrashed_crashdump_disabled(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void autoboot_command(const char *s)
|
||||
{
|
||||
debug("### main_loop: bootcmd=\"%s\"\n", s ? s : "<UNDEFINED>");
|
||||
|
|
@ -392,6 +397,11 @@ void autoboot_command(const char *s)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (apps_iscrashed_crashdump_disabled()) {
|
||||
printf("Crashdump disabled, resetting the board..\n");
|
||||
reset_board();
|
||||
}
|
||||
|
||||
if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) {
|
||||
#if defined(CONFIG_AUTOBOOT_KEYED) && !defined(CONFIG_AUTOBOOT_KEYED_CTRLC)
|
||||
int prev = disable_ctrlc(1); /* disable Control C checking */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue