diff options
| author | michael <[email protected]> | 2020-09-15 11:20:15 +0800 |
|---|---|---|
| committer | michael <[email protected]> | 2020-09-15 11:20:15 +0800 |
| commit | b86d608d631d5d50f51e202d8e28107b2dd69f9a (patch) | |
| tree | bbea9c7fa923a94c4ea5164d91abe4738f95e9db /bsp/ls2kdev/drivers/board.c | |
| parent | a8928c881ed935a1e2a45bb02bd0b2a7fe8d45d4 (diff) | |
bsp:ls2k: add reboot and shutdown support
Diffstat (limited to 'bsp/ls2kdev/drivers/board.c')
| -rw-r--r-- | bsp/ls2kdev/drivers/board.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bsp/ls2kdev/drivers/board.c b/bsp/ls2kdev/drivers/board.c index 6a66777121..f970e60574 100644 --- a/bsp/ls2kdev/drivers/board.c +++ b/bsp/ls2kdev/drivers/board.c @@ -22,6 +22,9 @@ */ void rt_hw_cpu_reset(void) { + WDT_EN = 0x01; + WDT_TIMER = 0x01; + WDT_SET = 0x01; rt_kprintf("reboot system...\n"); while (1); } @@ -32,6 +35,8 @@ void rt_hw_cpu_reset(void) */ void rt_hw_cpu_shutdown(void) { + PM1_STS &= 0xffffffff; + PM1_CNT = 0x3c00; rt_kprintf("shutdown...\n"); while (1); |
