summaryrefslogtreecommitdiff
path: root/chip/g
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-02-07 14:10:42 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-10 21:46:25 -0800
commit9b89574cc13cbf14f4d288e4f8f9bb53c1ecd3f7 (patch)
treeb966b1b04dc7b03faf7995c77194434d32cdb2e4 /chip/g
parent5bc3c147d56cdc6f9a040ea097ca38b69d5d5685 (diff)
downloadchrome-ec-9b89574cc13cbf14f4d288e4f8f9bb53c1ecd3f7.tar.gz
g: decorate _i2cs_write_complete_int() so that LTO does not loose it
Otherwise LTO optimizes this function away before finding out that it, in fact, needs this it. BRANCH=cr50, cr50-mp BUG=b:65253310 TEST=after the entire stack was applied Cr50 builds successfully with CONFIG_LTO enabled, and passes TCG test suite. Change-Id: I1bd8292b7228efc982118e23455503fefd52c689 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1460087 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/g')
-rw-r--r--chip/g/i2cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/g/i2cs.c b/chip/g/i2cs.c
index 2df18acc88..55aca1e85a 100644
--- a/chip/g/i2cs.c
+++ b/chip/g/i2cs.c
@@ -259,7 +259,7 @@ static void poll_read_state(void)
}
/* Process the 'end of a write cycle' interrupt. */
-static void _i2cs_write_complete_int(void)
+void __attribute__((used)) _i2cs_write_complete_int(void)
{
/* Reset the IRQ condition. */
GWRITE_FIELD(I2CS, INT_STATE, INTR_WRITE_COMPLETE, 1);