From 6f22113a78ba2958128bf129fae80e48148d890e Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Wed, 30 Jul 2014 15:49:48 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/210570 Reviewed-by: Alec Berg --- common/system.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/system.c b/common/system.c index db5d171b58..a9040899f2 100644 --- a/common/system.c +++ b/common/system.c @@ -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; -- cgit v1.2.1