rt_hw_cpu_shutdown: implement default weak function

and remvoe duplicated default functions in each cpu/bsp level
This commit is contained in:
Meco Man
2023-08-08 22:34:25 -04:00
parent cb810dfe75
commit c6a2f5b7bd
41 changed files with 25 additions and 394 deletions
+1 -1
View File
@@ -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");
-13
View File
@@ -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);
}
}
-11
View File
@@ -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);
}
}
/*@}*/
-22
View File
@@ -26,28 +26,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.
*/
-11
View File
@@ -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);
}
}
/*@}*/
-12
View File
@@ -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);
}
}
/*@}*/
+1 -1
View File
@@ -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)
{