diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-07-23 16:34:35 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-30 04:32:32 +0000 |
commit | c7a2cb72c6de063c83cc2b5385f1e67571267569 (patch) | |
tree | 45760db3175a93b561cf8cb275649cad30f86c62 /core/minute-ia | |
parent | b40786b4b8f543e8e33537582ca0b5b71f57b1f1 (diff) | |
download | chrome-ec-c7a2cb72c6de063c83cc2b5385f1e67571267569.tar.gz |
hooks: Introduce chipset resume init and suspend complete hooks
These hooks are only enabled through a new CONFIG.
The resume init hook will be used to initialize the SPI driver,
which goes to sleep on suspend. Require to initialize
it first such that it can receive a host resume event, that
notifies the normal resume hook.
The suspend complete hook is paired with the resume init hook,
which reverts the initialization of the SPI driver.
BRANCH=None
BUG=b:148149387
TEST=make buildall -j
TEST=Build successfully on both default off and defining this CONFIG.
Change-Id: I615e2bf92c75f83a7b0ab3eded61a1ef241dbdcf
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2321875
Diffstat (limited to 'core/minute-ia')
-rw-r--r-- | core/minute-ia/ec.lds.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/minute-ia/ec.lds.S b/core/minute-ia/ec.lds.S index 37d2d8da49..5b814abe42 100644 --- a/core/minute-ia/ec.lds.S +++ b/core/minute-ia/ec.lds.S @@ -84,6 +84,16 @@ SECTIONS KEEP(*(.rodata.HOOK_CHIPSET_SUSPEND)) __hooks_chipset_suspend_end = .; +#ifdef CONFIG_CHIPSET_RESUME_INIT_HOOK + __hooks_chipset_resume_init = .; + KEEP(*(.rodata.HOOK_CHIPSET_RESUME_INIT)) + __hooks_chipset_resume_init_end = .; + + __hooks_chipset_suspend_complete = .; + KEEP(*(.rodata.HOOK_CHIPSET_SUSPEND_COMPLETE)) + __hooks_chipset_suspend_complete_end = .; +#endif + __hooks_chipset_shutdown = .; KEEP(*(.rodata.HOOK_CHIPSET_SHUTDOWN)) __hooks_chipset_shutdown_end = .; |