mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
rt_hw_cpu_shutdown: implement default weak function
and remvoe duplicated default functions in each cpu/bsp level
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user