diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-03-19 10:59:38 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-03-19 15:41:14 -0700 |
commit | b2ac77b37b66ce2e6e621743d5cd1510457cc19f (patch) | |
tree | 53a66e7092d8a1fc74f04178c805ec05eb77f637 /chip/lm4/uart.c | |
parent | 1fd7062b29c685d98be8586ded4587e5e1e169ee (diff) | |
download | chrome-ec-b2ac77b37b66ce2e6e621743d5cd1510457cc19f.tar.gz |
Support warm reboot from one EC image to another.
This is necessary at init-time for verified boot to jump from RO to
one of the RW images.
It's also used by factory EC update to update one image and then jump
to the updated image to finish the update. In this case, the x86 does
NOT reboot.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8449
TEST=manual
1) power on x86 and log in
2) sysjump a --> system is in a; x86 has not rebooted
3) sysjump ro --> system is back in RO; x86 has not rebooted
4) reboot -> system is in RO; x86 HAS rebooted
Change-Id: I9dbadcf9775e146a0718abfd4ee0758b65350a87
Diffstat (limited to 'chip/lm4/uart.c')
-rw-r--r-- | chip/lm4/uart.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c index fa9ddb005f..652f1edf37 100644 --- a/chip/lm4/uart.c +++ b/chip/lm4/uart.c @@ -19,6 +19,15 @@ /* Baud rate for UARTs */ #define BAUD_RATE 115200 + +static int init_done; + + +int uart_init_done(void) +{ + return init_done; +} + void uart_tx_start(void) { /* Re-enable the transmit interrupt, then forcibly trigger the @@ -186,6 +195,8 @@ int uart_init(void) */ task_enable_irq(LM4_IRQ_UART0); + init_done = 1; + return EC_SUCCESS; } |