summaryrefslogtreecommitdiff
path: root/chip/mt_scp/mt8183/uart.c
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-09-23 22:28:52 +0000
committerCommit Bot <commit-bot@chromium.org>2021-09-27 22:23:36 +0000
commitdcd24535cf751fcdaa7c5f025c2e54705e4053f3 (patch)
tree0e79b571406664ce43d3136353fcb78c52baa6ea /chip/mt_scp/mt8183/uart.c
parent0c596a170a880579cef9c5beacaa1679a23c5cf2 (diff)
downloadchrome-ec-dcd24535cf751fcdaa7c5f025c2e54705e4053f3.tar.gz
chip/mt_scp: Declaration needs to come before definition
We are already disabling -Wignored-attributes to work around the declaration and definition order issue: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] However, although there are no compiler errors, the linker (lld) will still fail: ld.lld: error: undefined symbol: clock_control_irq >>> referenced by clock.c:347 (src/platform/ec/chip/mt_scp/mt8183/clock.c:347) >>> lto.tmp:(irq_13_handler) ... ld.lld: error: undefined symbol: clock_fast_wakeup_irq >>> referenced by clock.c:355 (src/platform/ec/chip/mt_scp/mt8183/clock.c:355) >>> lto.tmp:(irq_44_handler) Tested with the compare_build.sh script to validate that the resulting binaries are identical. BRANCH=none BUG=b:172020503 TEST=CC=arm-none-eabi-clang make BOARD=kukui_scp -j TEST=./util/compare_build.sh --boards all -j 50 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib622fb98784a4c3ad3c199c72ee7604c7f709d6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3182621 Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'chip/mt_scp/mt8183/uart.c')
-rw-r--r--chip/mt_scp/mt8183/uart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/mt_scp/mt8183/uart.c b/chip/mt_scp/mt8183/uart.c
index 78ea594c6b..7907f9537d 100644
--- a/chip/mt_scp/mt8183/uart.c
+++ b/chip/mt_scp/mt8183/uart.c
@@ -93,6 +93,7 @@ void uart_process(void)
}
#if (UARTN < SCP_UART_COUNT)
+DECLARE_IRQ(UART_IRQ(UARTN), uart_interrupt, 2);
void uart_interrupt(void)
{
uint8_t ier;
@@ -103,8 +104,8 @@ void uart_interrupt(void)
UART_IER(UARTN) = 0;
UART_IER(UARTN) = ier;
}
-DECLARE_IRQ(UART_IRQ(UARTN), uart_interrupt, 2);
+DECLARE_IRQ(UART_RX_IRQ(UARTN), uart_rx_interrupt, 2);
void uart_rx_interrupt(void)
{
uint8_t ier;
@@ -117,7 +118,6 @@ void uart_rx_interrupt(void)
UART_IER(UARTN) = ier;
SCP_INTC_UART_RX_IRQ |= 1 << UARTN;
}
-DECLARE_IRQ(UART_RX_IRQ(UARTN), uart_rx_interrupt, 2);
#endif
void uart_task(void)