summaryrefslogtreecommitdiff
path: root/core/riscv-rv32i/task.c
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@chromium.org>2020-05-27 10:14:44 +0800
committerCommit Bot <commit-bot@chromium.org>2020-05-29 04:03:11 +0000
commit7808773254b3c4b910eef167319b49e6acec738a (patch)
treedf55b6ca983d133c86e4572aaf11b54157d85101 /core/riscv-rv32i/task.c
parent468f2fb73676f0a4db3cc62e4874d1962ba3746a (diff)
downloadchrome-ec-7808773254b3c4b910eef167319b49e6acec738a.tar.gz
core/riscv-rv32i: remove get_sw_int()
Inline the function definition. BRANCH=none BUG=b:146213943 BUG=b:157521370 TEST=1. make BOARD=asurada 2. flash_ec --board=asurada --image build/asurada/ec.bin 3. (EC console)> version Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: Icfde6399b2dd560924128f9e7fbeb54efaa9c14c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217595 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/riscv-rv32i/task.c')
-rw-r--r--core/riscv-rv32i/task.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/riscv-rv32i/task.c b/core/riscv-rv32i/task.c
index 443a924602..cf734d4078 100644
--- a/core/riscv-rv32i/task.c
+++ b/core/riscv-rv32i/task.c
@@ -225,14 +225,6 @@ int task_start_called(void)
return start_called;
}
-static int __ram_code get_sw_int(void)
-{
- /* If this is a SW interrupt */
- if (get_mcause() == 11)
- return sw_int_num;
- return 0;
-}
-
/**
* Scheduling system call
*
@@ -325,7 +317,7 @@ void __ram_code start_irq_handler(void)
/* If this is a SW interrupt */
if (get_mcause() == 11) {
- ec_int = get_sw_int();
+ ec_int = sw_int_num;
ec_int_group = 16;
} else {
/* Determine interrupt number */