arch/arm/amebad_reboot_reason.c : Add condition to check initial reboot reason
If saved reboot reason is not initialized one and is not 0, then we should check Amebad reboot reson like hw reset, wdt reset and so on.
@@ -74,7 +74,7 @@ static reboot_reason_code_t up_reboot_reason_get_hw_value(void)
/* Read the same backup register for the boot reason */
boot_reason = BKUP_Read(BKUP_REG1);
- if (boot_reason != REBOOT_REASON_INITIALIZED) {
+ if ((boot_reason != REBOOT_REASON_INITIALIZED) && (boot_reason != 0)) {
return boot_reason;
} else {
/* Read AmebaD Boot Reason, WDT and HW reset supported */
