From 940a0fa4df1ce335229eb6f80143b93a84ba358c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 7 Feb 2014 14:39:52 -0600 Subject: [PATCH] baytrail: don't increment boot count on S3 resume The boot counter was always being incremented even on S3 resume. Just increment the boot count on non-S3 resume boots. BUG=chrome-os-partner:25577 BRANCH=baytrail TEST=Boot. Note boot count. Suspend Resume. Reboot. Note difference in boot count of 1. Change-Id: I76a846f6fbf20c4cee3e1f652ae43b4048ce4b3a Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/185381 Reviewed-by: Shawn Nematbakhsh --- src/soc/intel/baytrail/romstage/romstage.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/soc/intel/baytrail/romstage/romstage.c b/src/soc/intel/baytrail/romstage/romstage.c index 26a9e2777a..73c4db6e88 100644 --- a/src/soc/intel/baytrail/romstage/romstage.c +++ b/src/soc/intel/baytrail/romstage/romstage.c @@ -235,15 +235,17 @@ void romstage_common(struct romstage_params *params) mark_ts(params, timestamp_get()); -#if CONFIG_ELOG_BOOT_COUNT - boot_count_increment(); -#endif - ps = fill_power_state(); prev_sleep_state = chipset_prev_sleep_state(ps); printk(BIOS_DEBUG, "prev_sleep_state = S%d\n", prev_sleep_state); +#if CONFIG_ELOG_BOOT_COUNT + if (prev_sleep_state != 3) + boot_count_increment(); +#endif + + /* Initialize RAM */ raminit(params->mrc_params, prev_sleep_state);