diff options
| author | Meco Man <[email protected]> | 2023-08-07 12:42:10 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2023-08-08 22:34:25 -0400 |
| commit | c6a2f5b7bdee378cc868ee9284e760ebbdf635f0 (patch) | |
| tree | cde35e55f90e6a0b12a5796734a9b75fbdc65d0a /bsp | |
| parent | cb810dfe750dab6a53a8c20d83f082e0a12ab024 (diff) | |
rt_hw_cpu_shutdown: implement default weak function
and remvoe duplicated default functions in each cpu/bsp level
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/allwinner_tina/libcpu/cpuport.c | 2 | ||||
| -rw-r--r-- | bsp/bluetrum/libcpu/cpu/cpuport.c | 13 | ||||
| -rw-r--r-- | bsp/imx6sx/cortex-a9/cpu/cpu.c | 11 | ||||
| -rw-r--r-- | bsp/mipssim/drivers/board.c | 22 | ||||
| -rw-r--r-- | bsp/raspberry-pi/raspi2/cpu/cpu.c | 11 | ||||
| -rw-r--r-- | bsp/raspberry-pi/raspi3-32/cpu/cpu.c | 12 | ||||
| -rw-r--r-- | bsp/rockchip/rk3568/driver/board.c | 2 |
7 files changed, 2 insertions, 71 deletions
diff --git a/bsp/allwinner_tina/libcpu/cpuport.c b/bsp/allwinner_tina/libcpu/cpuport.c index 94f2baf415..37d6469955 100644 --- a/bsp/allwinner_tina/libcpu/cpuport.c +++ b/bsp/allwinner_tina/libcpu/cpuport.c @@ -160,7 +160,7 @@ void rt_hw_cpu_reset() * shutdown CPU * */ -void rt_hw_cpu_shutdown() +void rt_hw_cpu_shutdown(void) { rt_uint32_t level; rt_kprintf("shutdown...\n"); diff --git a/bsp/bluetrum/libcpu/cpu/cpuport.c b/bsp/bluetrum/libcpu/cpu/cpuport.c index a2d405ccdd..d292585028 100644 --- a/bsp/bluetrum/libcpu/cpu/cpuport.c +++ b/bsp/bluetrum/libcpu/cpu/cpuport.c @@ -52,16 +52,3 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, /* return task's current stack address */ return (rt_uint8_t *)stk; } - -/** shutdown CPU */ -void rt_hw_cpu_shutdown(void) -{ - rt_uint32_t level; - rt_kprintf("shutdown...\n"); - - level = rt_hw_interrupt_disable(); - while (level) - { - RT_ASSERT(0); - } -} diff --git a/bsp/imx6sx/cortex-a9/cpu/cpu.c b/bsp/imx6sx/cortex-a9/cpu/cpu.c index 2d78715011..ec44c1493b 100644 --- a/bsp/imx6sx/cortex-a9/cpu/cpu.c +++ b/bsp/imx6sx/cortex-a9/cpu/cpu.c @@ -17,17 +17,6 @@ */ /*@{*/ -/** shutdown CPU */ -void rt_hw_cpu_shutdown() -{ - rt_uint32_t level; - rt_kprintf("shutdown...\n"); - level = rt_hw_interrupt_disable(); - while (level) - { - RT_ASSERT(0); - } -} /*@}*/ diff --git a/bsp/mipssim/drivers/board.c b/bsp/mipssim/drivers/board.c index a0ef220bc7..9c295f0a28 100644 --- a/bsp/mipssim/drivers/board.c +++ b/bsp/mipssim/drivers/board.c @@ -27,28 +27,6 @@ extern unsigned char __bss_end; /** - * this function will reset CPU - * - */ -void rt_hw_cpu_reset(void) -{ - rt_kprintf("reboot system...\n"); - while (1); -} - -/** - * this function will shutdown CPU - * - */ -void rt_hw_cpu_shutdown(void) -{ - rt_kprintf("shutdown...\n"); - - while (1); -} - - -/** * This is the timer interrupt service routine. */ void rt_hw_timer_handler(void) diff --git a/bsp/raspberry-pi/raspi2/cpu/cpu.c b/bsp/raspberry-pi/raspi2/cpu/cpu.c index 5f82671c1b..78dce1a237 100644 --- a/bsp/raspberry-pi/raspi2/cpu/cpu.c +++ b/bsp/raspberry-pi/raspi2/cpu/cpu.c @@ -17,17 +17,6 @@ */ /*@{*/ -/** shutdown CPU */ -void rt_hw_cpu_shutdown() -{ - rt_uint32_t level; - rt_kprintf("shutdown...\n"); - level = rt_hw_interrupt_disable(); - while (level) - { - RT_ASSERT(0); - } -} /*@}*/ diff --git a/bsp/raspberry-pi/raspi3-32/cpu/cpu.c b/bsp/raspberry-pi/raspi3-32/cpu/cpu.c index b43b804597..d0a583e96b 100644 --- a/bsp/raspberry-pi/raspi3-32/cpu/cpu.c +++ b/bsp/raspberry-pi/raspi3-32/cpu/cpu.c @@ -75,17 +75,5 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock) */ /*@{*/ -/** shutdown CPU */ -void rt_hw_cpu_shutdown() -{ - rt_uint32_t level; - rt_kprintf("shutdown...\n"); - - level = rt_hw_interrupt_disable(); - while (level) - { - RT_ASSERT(0); - } -} /*@}*/ diff --git a/bsp/rockchip/rk3568/driver/board.c b/bsp/rockchip/rk3568/driver/board.c index 06197763d3..5fdbe52ea0 100644 --- a/bsp/rockchip/rk3568/driver/board.c +++ b/bsp/rockchip/rk3568/driver/board.c @@ -133,7 +133,7 @@ void start_cpu(int argc, char *argv[]) MSH_CMD_EXPORT(start_cpu, start_cpu); #ifdef RT_AMP_SLAVE -void rt_hw_cpu_shutdown() +void rt_hw_cpu_shutdown(void) { if (psci_ops.cpu_off) { |
