Hung-Te Lin (hungte@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3102
-gerrit
commit e15c7ea444609890a84c4c5680b284efbdf504c5 Author: Hung-Te Lin hungte@chromium.org Date: Thu Apr 25 19:49:40 2013 +0800
Google/Snow: Enable suspend/resume.
Add the suspend/resume feature into bootblock and romstage.
Note, resuming with X and touchpad driver may be still unstable.
Verified by building and booting successfully on Google/Snow, and then executing the "suspend_stress_test" in text mode ("stop ui; suspend_stress_test") in Chromium OS, passed at least 20 iterations.
Change-Id: I65681c42eeef2736e55bb906595f42a5b1dfdf11 Signed-off-by: Hung-Te Lin hungte@chromium.org --- src/mainboard/google/snow/bootblock.c | 17 ++++++++++++----- src/mainboard/google/snow/romstage.c | 13 ++++++++++--- 2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/mainboard/google/snow/bootblock.c b/src/mainboard/google/snow/bootblock.c index d2e0b50..d6411b5 100644 --- a/src/mainboard/google/snow/bootblock.c +++ b/src/mainboard/google/snow/bootblock.c @@ -25,16 +25,23 @@ #include <console/console.h> #include <cpu/samsung/exynos5250/periph.h> #include <cpu/samsung/exynos5250/pinmux.h> +#include "mainboard.h"
void bootblock_mainboard_init(void); void bootblock_mainboard_init(void) { - /* kick off the microsecond timer. We want to do this as early - * as we can. - */ - timer_start(); + switch (board_get_wakeup_state()) { + case BOARD_WAKEUP_DIRECT: + board_wakeup(); + break;
- exynos_pinmux_config(PERIPH_ID_SPI1, PINMUX_FLAG_NONE); + case BOARD_IS_NOT_WAKEUP: + /* kick off the microsecond timer. + * We want to do this as early as we can. + */ + timer_start(); + break; + } #if CONFIG_EARLY_CONSOLE exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE); console_init(); diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c index c067629..3eff129 100644 --- a/src/mainboard/google/snow/romstage.c +++ b/src/mainboard/google/snow/romstage.c @@ -170,15 +170,22 @@ void main(void) { struct mem_timings *mem; void *entry; + int is_resume = (board_get_wakeup_state() != BOARD_IS_NOT_WAKEUP);
/* Clock must be initialized before console_init, otherwise you may need * to re-initialize serial console drivers again. */ mem = board_setup_clock();
- console_init(); - board_setup_power(); + if (!is_resume) { + console_init(); + board_setup_power(); + } + + board_setup_memory(mem, is_resume);
- board_setup_memory(mem, 0); + if (is_resume) { + board_wakeup(); + }
board_setup_storage(); board_setup_gpio();