summaryrefslogtreecommitdiff
path: root/chip/npcx/watchdog.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-04-27 14:47:19 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-19 02:46:27 +0000
commit2650ff3d70c9933e4c3dcd1401ca66b4426def4a (patch)
tree7a4658b060d3439a525a7562c226358d55424035 /chip/npcx/watchdog.c
parentcb29daa58c0fa5866a7847c454967ef0376c7688 (diff)
downloadchrome-ec-2650ff3d70c9933e4c3dcd1401ca66b4426def4a.tar.gz
Add option to enable GCC LTO
Add CONFIG_LTO to use GCC Link-Time Optimizations to try to reduce the flash footprint of the firmware. Add additional protection to some functions/data to avoid removal by the linker when their usage is not obvious. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make buildall (with and without LTO enable on all boards) Change-Id: I586b8c1eda4592b416c85383b65153c1d5ab0059 Reviewed-on: https://chromium-review.googlesource.com/271291 Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/npcx/watchdog.c')
-rw-r--r--chip/npcx/watchdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/npcx/watchdog.c b/chip/npcx/watchdog.c
index f72be3cb7b..036a768bb6 100644
--- a/chip/npcx/watchdog.c
+++ b/chip/npcx/watchdog.c
@@ -45,7 +45,7 @@ void watchdog_init_warning_timer(void)
task_enable_irq(ITIM16_INT(ITIM_WDG_NO));
}
-void watchdog_check(uint32_t excep_lr, uint32_t excep_sp)
+void __keep watchdog_check(uint32_t excep_lr, uint32_t excep_sp)
{
int wd_cnt;
/* Clear timeout status for event */