mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
system: Add console print for reboot-on-ap-shutdown
If the EC suddenly resets due to a reboot-on-ap-shutdown host command, it's often not obvious why, so add a print. BUG=None TEST=Trigger cold reboot-on-ap-shutdown, verify print is seen on console. BRANCH=Kevin Change-Id: Iada34c9575462e687ffc6267b1ffead394b72bfe Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/386264 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit ab6f29a02bf36cdcca309b304a07006bebec01e9) Reviewed-on: https://chromium-review.googlesource.com/387628 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
0821405e40
commit
d94fd4faf5
@@ -32,6 +32,7 @@
|
||||
|
||||
/* Console output macros */
|
||||
#define CPUTS(outstr) cputs(CC_SYSTEM, outstr)
|
||||
#define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ## args)
|
||||
#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args)
|
||||
|
||||
/* Round up to a multiple of 4 */
|
||||
@@ -812,6 +813,8 @@ static int handle_pending_reboot(enum ec_reboot_cmd cmd)
|
||||
|
||||
static void system_common_shutdown(void)
|
||||
{
|
||||
if (reboot_at_shutdown)
|
||||
CPRINTF("Reboot at shutdown: %d\n", reboot_at_shutdown);
|
||||
handle_pending_reboot(reboot_at_shutdown);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, system_common_shutdown, HOOK_PRIO_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user