diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c index ad22766..63914d3 100644 --- a/arch/arm/mach-imx/imx.c +++ b/arch/arm/mach-imx/imx.c @@ -199,12 +199,8 @@ } } - /* - * Report this with above default priority in order to make - * sure we'll always override info from watchdog driver. - */ reset_source_set_priority(type, - RESET_SOURCE_DEFAULT_PRIORITY + 1); + RESET_SOURCE_DEFAULT_PRIORITY); reset_source_set_instance(type, instance); pr_info("i.MX reset reason %s (SRSR: 0x%08x)\n", diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c index a66fae4..8dba662 100644 --- a/drivers/watchdog/imxwd.c +++ b/drivers/watchdog/imxwd.c @@ -162,19 +162,23 @@ static void imx_watchdog_detect_reset_source(struct imx_wd *priv) { u16 val = readw(priv->base + IMX21_WDOG_WSTR); + int priority = RESET_SOURCE_DEFAULT_PRIORITY; + + if (reset_source_get() == RESET_WDG) + priority++; if (val & WSTR_COLDSTART) { - reset_source_set(RESET_POR); + reset_source_set_priority(RESET_POR, priority); return; } if (val & (WSTR_HARDRESET | WSTR_WARMSTART)) { - reset_source_set(RESET_RST); + reset_source_set_priority(RESET_RST, priority); return; } if (val & WSTR_WDOG) { - reset_source_set(RESET_WDG); + reset_source_set_priority(RESET_WDG, priority); return; }