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
-19
View File
@@ -16,23 +16,4 @@
*/
/*@{*/
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset()
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
/*@}*/
-18
View File
@@ -16,23 +16,5 @@
*/
/*@{*/
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset()
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
/*@}*/
+1 -1
View File
@@ -182,7 +182,7 @@ rt_base_t rt_hw_cpu_dcache_status()
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
void rt_hw_cpu_shutdown(void)
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -161,7 +161,7 @@ void rt_hw_cpu_reset()
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
void rt_hw_cpu_shutdown(void)
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -162,7 +162,7 @@ void rt_hw_cpu_reset()
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
void rt_hw_cpu_shutdown(void)
{
rt_base_t level;
rt_kprintf("shutdown...\n");
+1 -1
View File
@@ -74,7 +74,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
/*@{*/
/** shutdown CPU */
rt_weak void rt_hw_cpu_shutdown()
void rt_hw_cpu_shutdown(void)
{
rt_base_t level;
rt_kprintf("shutdown...\n");
-10
View File
@@ -343,16 +343,6 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
while (1);
}
/**
* shutdown CPU
*/
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
RT_ASSERT(0);
}
/**
* reset CPU
*/
-10
View File
@@ -485,16 +485,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
while (1);
}
/**
* shutdown CPU
*/
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
RT_ASSERT(0);
}
/**
* reset CPU
*/
-10
View File
@@ -428,16 +428,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
while (1);
}
/**
* shutdown CPU
*/
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
RT_ASSERT(0);
}
/**
* reset CPU
*/
-10
View File
@@ -427,16 +427,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
while (1);
}
/**
* shutdown CPU
*/
rt_weak void rt_hw_cpu_shutdown(void)
{
rt_kprintf("shutdown...\n");
RT_ASSERT(0);
}
/**
* reset CPU
*/
-19
View File
@@ -16,25 +16,6 @@
*/
/*@{*/
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset()
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
#ifdef __TI_COMPILER_VERSION__
#ifdef RT_USING_CPU_FFS
int __rt_ffs(int value)
+1 -1
View File
@@ -160,7 +160,7 @@ void rt_hw_cpu_reset()
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
void rt_hw_cpu_shutdown(void)
{
rt_base_t level;
rt_kprintf("shutdown...\n");
-19
View File
@@ -159,25 +159,6 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
return old_handler;
}
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset(void)
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
void rt_hw_trap_irq(void)
{
int irqno;
-19
View File
@@ -16,23 +16,4 @@
*/
/*@{*/
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset()
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
/*@}*/
-13
View File
@@ -17,17 +17,4 @@
*/
/*@{*/
/** shutdown CPU */
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
level = rt_hw_interrupt_disable();
while (level)
{
RT_ASSERT(0);
}
}
/*@}*/
-15
View File
@@ -167,20 +167,5 @@ void rt_hw_cpu_reset()
/* NEVER REACHED */
}
/**
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
level = rt_hw_interrupt_disable();
while (level)
{
RT_ASSERT(0);
}
}
/*@}*/
-19
View File
@@ -96,23 +96,4 @@ rt_base_t rt_hw_cpu_dcache_status()
return rt_hw_cpu_icache_status();
}
/**
* this function will reset CPU
*
*/
void rt_hw_cpu_reset()
{
}
/**
* this function will shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
while (1);
}
/*@}*/
-16
View File
@@ -169,20 +169,4 @@ void rt_hw_cpu_reset()
/* NEVER REACHED */
}
/**
* shutdown CPU
*
*/
rt_weak void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
level = rt_hw_interrupt_disable();
while (level)
{
RT_ASSERT(RT_NULL);
}
}
/*@}*/
-16
View File
@@ -18,19 +18,3 @@ void rt_hw_cpu_reset()
while (1); /* loop forever and wait for reset to happen */
/* NEVER REACHED */
}
/**
* shutdown CPU
*
*/
void rt_hw_cpu_shutdown()
{
rt_base_t level;
rt_kprintf("shutdown...\n");
level = rt_hw_interrupt_disable();
while (level)
{
RT_ASSERT(0);
}
}