From da7b8e4de9a690cbed00a361d282b18792c676d6 Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 28 Jun 2013 17:27:17 +0800 Subject: armv7/exynos: Prevent unexpected reboots in resume. In resume path, if memory setup takes too long without setting PS_HOLD, EC watch dog may power off or reboot the system. To prevent that, we should enable PS_HOLD in same timing as cold boot - right before starting memory setup. Change-Id: I5c294fa7ae015f8cff57b1fd81e5b80902647b15 Signed-off-by: Hung-Te Lin Signed-off-by: Gabe Black Reviewed-on: http://review.coreboot.org/3718 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/pit/romstage.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mainboard/google/pit') diff --git a/src/mainboard/google/pit/romstage.c b/src/mainboard/google/pit/romstage.c index 7ba66a4a35..30c8aeb8f2 100644 --- a/src/mainboard/google/pit/romstage.c +++ b/src/mainboard/google/pit/romstage.c @@ -74,13 +74,17 @@ struct pmic_write pmic_writes[] = MAX77802_BUCK_TYPE1_IGNORE_PWRREQ } }; -static void setup_power(void) +static void setup_power(int is_resume) { int error = 0; int i; power_init(); + if (is_resume) { + return; + } + /* Initialize I2C bus to configure PMIC. */ exynos_pinmux_i2c4(); i2c_init(4, I2C_4_SPEED, 0x00); @@ -264,10 +268,7 @@ void main(void) console_init(); - if (!is_resume) { - setup_power(); - } - + setup_power(is_resume); setup_memory(&mem_timings, is_resume); primitive_mem_test(); -- cgit v1.2.3