diff options
author | Dino Li <dino.li@ite.com.tw> | 2015-10-01 11:46:00 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-01 01:55:26 -0700 |
commit | 692428e1a6676efa7e952b747aac1cee6c503922 (patch) | |
tree | bb4423190b979695733fa41c681945fa1c489fd9 /core/nds32/init.S | |
parent | 04bb47c32a22bc6b01dc1d03a423a945a74b1c10 (diff) | |
download | chrome-ec-692428e1a6676efa7e952b747aac1cee6c503922.tar.gz |
it8380dev: fix hw timer and related function.
[chip config]
1. No hardware specific udelay().
2. Enable watchdog.
[watchdog]
3. Watchdog period is "CONFIG_WATCHDOG_PERIOD_MS" of config.h.
4. Watchdog auxiliary timer period is "CONFIG_AUX_TIMER_PERIOD_MS".
[task and irq]
5. Write 1 to clear interrupt pending status, no |.
6. A global variable for store interrupt number of software interrupt.
[uart]
7. Always reset UART module before config it.
[hwtimer]
8. Use more external timers for HW timer module.
[task]
9. Fix task profiling.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=[watchdog]
1. console "waitms 1100", only pre-watchdog warning message.
2. console "waitms 1600", warning message and watchdog reset.
[hwtimer]
3. console commands "gettime", "timerinfo", and "forcetime".
4. enable hook debug and there is no delayed by more than 10%
warning message over 48 hours.
5. There is no watchdog reset too.
[task]
6. console 'taskinfo'
Task Ready Name Events Time (s) StkUsed
0 R << idle >> 00000000 32.927724 308/512
1 HOOKS 00000000 0.034267 372/768
2 R CONSOLE 00000000 0.116763 468/768
3 HOSTCMD 00000000 0.000641 372/512
4 KEYPROTO 00000000 0.000042 212/512
5 KEYSCAN 00000000 0.000908 356/512
IRQ counts by type:
38 2932
155 1
158 261
160 67
Service calls: 87
Total exceptions: 3348
Task switches: 167
Task switching started: 0.001999 s
Time in tasks: 33.282819 s
Time in exceptions: 0.164717 s
Change-Id: I234085cec231cd855d2a5e639ea1b0966c61d796
Reviewed-on: https://chromium-review.googlesource.com/296939
Commit-Ready: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'core/nds32/init.S')
-rw-r--r-- | core/nds32/init.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/nds32/init.S b/core/nds32/init.S index a27fcd8d0e..d5d93d299b 100644 --- a/core/nds32/init.S +++ b/core/nds32/init.S @@ -20,6 +20,8 @@ __entry_\()\name: smw.adm $r15, [$sp], $r15, 0xb /* r0-r5 are caller saved */ smw.adm $r0, [$sp], $r5, 0 + /* isr entry */ + jal start_irq_handler /* switch to system stack if we are called from process stack */ la $r3, stack_end mov55 $fp, $sp @@ -30,6 +32,8 @@ __entry_\()\name: /* check whether we need to change the scheduled task */ lwi.gp $r2, [ + need_resched] bnez $r2, __switch_task + /* isr exit */ + jal end_irq_handler /* restore r0-r5 */ lmw.bim $r0, [$fp], $r5, 0 /* restore r15, fp, lp and sp */ |