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. BUG=none TEST=emerge-daisy chromeos-coreboot-snow BRANCH=none Change-Id: I187b85d5ff17774dc83efe5c72d61caff1543113 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/60335 Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
parent
65693bab71
commit
649bdb1166
2 changed files with 12 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -43,12 +43,16 @@
|
|||
#define PMIC_BUS 0
|
||||
#define MMC0_GPIO_PIN (58)
|
||||
|
||||
static void setup_power(void)
|
||||
static void setup_power(int is_resume)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
power_init();
|
||||
|
||||
if (is_resume) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Initialize I2C bus to configure PMIC. */
|
||||
exynos_pinmux_i2c0();
|
||||
i2c_init(0, I2C_0_SPEED, 0x00);
|
||||
|
|
@ -171,10 +175,7 @@ void main(void)
|
|||
|
||||
console_init();
|
||||
|
||||
if (!is_resume) {
|
||||
setup_power();
|
||||
}
|
||||
|
||||
setup_power(is_resume);
|
||||
setup_memory(mem, is_resume);
|
||||
|
||||
if (is_resume) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue