mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
Request to hard-reboot EC should reboot PD as well
Software sync on the AP will ask the EC to reboot to RO after the AP shuts down. This allows the AP to do a clean shutdown before the EC reboots. The PD chip should be rebooted at the same time the EC reboots itself, so that in a low-battery case the requested PD reboot also takes place after AP shutdown. BUG=chrome-os-partner:30079 BRANCH=none TEST=From the EC console, 'reboot hard' also reboots the PD chip. Change-Id: I109a495ca32ad1ac4aac42708935962d3226792e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/210570 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
1b82905cfe
commit
6f22113a78
@@ -612,6 +612,12 @@ static int handle_pending_reboot(enum ec_reboot_cmd cmd)
|
||||
case EC_REBOOT_JUMP_RW:
|
||||
return system_run_image_copy(SYSTEM_IMAGE_RW);
|
||||
case EC_REBOOT_COLD:
|
||||
#ifdef HAS_TASK_PDCMD
|
||||
/* Reboot the PD chip as well */
|
||||
gpio_set_level(GPIO_USB_MCU_RST_L, 0);
|
||||
usleep(100);
|
||||
gpio_set_level(GPIO_USB_MCU_RST_L, 1);
|
||||
#endif
|
||||
system_reset(SYSTEM_RESET_HARD);
|
||||
/* That shouldn't return... */
|
||||
return EC_ERROR_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user