[libcpu][update]重启与关机函数:rt_hw_cpu_shutdown、rt_hw_cpu_reset,补充WEAK属性
This commit is contained in:
parent
9dc0bbb814
commit
355f8dd95c
|
@ -76,7 +76,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
|
|||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -32,7 +32,7 @@ struct init_stack_frame {
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -146,7 +146,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
|
@ -161,7 +161,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -147,7 +147,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
|
@ -162,7 +162,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -74,7 +74,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
|
|||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -344,7 +344,7 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Restarting system...\n");
|
||||
|
@ -160,7 +160,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -163,7 +163,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset(void)
|
||||
RT_WEAK void rt_hw_cpu_reset(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ void rt_hw_cpu_reset(void)
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
/*@{*/
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -148,7 +148,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
/* Disable all interrupt except the WDT */
|
||||
INTMSK = (~((rt_uint32_t)1 << INTWDT));
|
||||
|
@ -171,7 +171,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -100,7 +100,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ rt_base_t rt_hw_cpu_dcache_status()
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
/* enable watchdog */
|
||||
|
@ -173,7 +173,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t UNUSED level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
while (1); /* loop forever and wait for reset to happen */
|
||||
|
||||
|
@ -27,7 +27,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset(void)
|
||||
RT_WEAK void rt_hw_cpu_reset(void)
|
||||
{
|
||||
/* open the watch-dog */
|
||||
WDT_EN = 0x01; /* watch dog enable */
|
||||
|
@ -38,7 +38,7 @@ void rt_hw_cpu_reset(void)
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to)
|
|||
#endif /* end of RT_USING_SMP */
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -152,7 +152,7 @@ void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
|
|||
* @brief shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -157,7 +157,7 @@ void rt_hw_interrupt_enable(rt_base_t level)
|
|||
}
|
||||
|
||||
/** shutdown CPU */
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -182,7 +182,7 @@ void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to)
|
|||
*
|
||||
* @author LXZ (2014/11/8)
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ int __rt_ffs(int value)
|
|||
/**
|
||||
* shutdown CPU
|
||||
*/
|
||||
void rt_hw_cpu_shutdown(void)
|
||||
RT_WEAK void rt_hw_cpu_shutdown(void)
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ static void sep6200_poweroff(void)
|
|||
* reset cpu by dog's time-out
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
|
||||
rt_kprintf("Soft reset, Restarting system...\n");
|
||||
|
@ -274,7 +274,7 @@ void rt_hw_cpu_reset()
|
|||
* shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_uint32_t level;
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* this function will reset CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_reset()
|
||||
RT_WEAK void rt_hw_cpu_reset()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ void rt_hw_cpu_reset()
|
|||
* this function will shutdown CPU
|
||||
*
|
||||
*/
|
||||
void rt_hw_cpu_shutdown()
|
||||
RT_WEAK void rt_hw_cpu_shutdown()
|
||||
{
|
||||
rt_kprintf("shutdown...\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue