diff options
author | Sam Hurst <shurst@google.com> | 2021-05-18 12:45:38 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-03 03:11:36 +0000 |
commit | 852c49f4ebe3676d02cfd5ed0450d4db87df798c (patch) | |
tree | 54eb2184455f4a700bfca560b6ec40e3c5688ab5 /common/system.c | |
parent | 42eb3e3033e52af4a14b4c61dcd6e1c8326769f0 (diff) | |
download | chrome-ec-852c49f4ebe3676d02cfd5ed0450d4db87df798c.tar.gz |
zephyr: Don't reinitialize gpios on a warm reboot
Don't reinitialize gpios on a warm reboot
BRANCH=none
BUG=b:187337449,b:186458444
TEST=Verified that the system booted properly
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: Ie11bdde9fa0124c0bf21cdc9baa3a98a85bbdad2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2904549
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/system.c')
-rw-r--r-- | common/system.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/common/system.c b/common/system.c index 0e4f9848d9..e2c48278c8 100644 --- a/common/system.c +++ b/common/system.c @@ -305,6 +305,21 @@ void system_print_banner(void) } } +struct jump_data *get_jump_data(void) +{ + uintptr_t addr; + + /* + * Put the jump data before the panic data, or at the end of RAM if + * panic data is not present. + */ + addr = get_panic_data_start(); + if (!addr) + addr = CONFIG_RAM_BASE + CONFIG_RAM_SIZE; + + return (struct jump_data *)(addr - sizeof(struct jump_data)); +} + int system_jumped_to_this_image(void) { return jumped_to_image; @@ -816,8 +831,6 @@ const char *system_get_build_info(void) void system_common_pre_init(void) { - uintptr_t addr; - #ifdef CONFIG_SOFTWARE_PANIC /* * Log panic cause if watchdog caused reset and panic cause @@ -835,15 +848,7 @@ void system_common_pre_init(void) } #endif - /* - * Put the jump data before the panic data, or at the end of RAM if - * panic data is not present. - */ - addr = get_panic_data_start(); - if (!addr) - addr = CONFIG_RAM_BASE + CONFIG_RAM_SIZE; - - jdata = (struct jump_data *)(addr - sizeof(struct jump_data)); + jdata = get_jump_data(); /* * Check jump data if this is a jump between images. |