and remvoe duplicated default functions in each cpu/bsp level
@@ -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");
@@ -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);
- }
-}
@@ -17,17 +17,6 @@
/*@{*/
/*@}*/
@@ -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
/**
* This is the timer interrupt service routine.
@@ -75,17 +75,5 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
@@ -133,7 +133,7 @@ void start_cpu(int argc, char *argv[])
MSH_CMD_EXPORT(start_cpu, start_cpu);
#ifdef RT_AMP_SLAVE
if (psci_ops.cpu_off)
@@ -74,14 +74,4 @@ void rt_hw_interrupt_umask(int vector);
void rt_hw_interrupt_install(int vector, rt_isr_handler_t new_handler,
rt_isr_handler_t *old_handler);
- * This function will reset whole platform.
-void rt_hw_cpu_reset(void);
- * This function will halt whole platform.
-void rt_hw_cpu_shutdown(void);
/**@}*/
@@ -357,7 +357,7 @@ const char *rt_hw_cpu_arch(void)
/** shutdown CPU */
-rt_weak void rt_hw_cpu_shutdown()
@@ -56,8 +56,6 @@ extern struct cpu_ops_t cpu_ops_spin_tbl;
#endif /* RT_USING_SMP */
-extern void rt_hw_cpu_shutdown(void);
extern void (*system_off)(void);
#endif /* __RT_HW_CPU_H__ */
@@ -29,14 +29,6 @@ struct init_stack_frame {
rt_uint32_t r0;
};
- * shutdown CPU
-rt_weak void rt_hw_cpu_shutdown(void)
rt_uint8_t *rt_hw_stack_init(void *tentry,
void *parameter,
rt_uint8_t *stack_addr,
@@ -16,23 +16,4 @@
-void rt_hw_cpu_reset()
@@ -16,23 +16,5 @@
@@ -182,7 +182,7 @@ rt_base_t rt_hw_cpu_dcache_status()
rt_base_t level;
@@ -161,7 +161,7 @@ void rt_hw_cpu_reset()
@@ -162,7 +162,7 @@ void rt_hw_cpu_reset()
@@ -74,7 +74,7 @@ void rt_hw_spin_unlock(rt_hw_spinlock_t *lock)
@@ -343,16 +343,6 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
while (1);
* reset CPU
@@ -485,16 +485,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
@@ -428,16 +428,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
@@ -427,16 +427,6 @@ void rt_hw_hard_fault_exception(struct exception_info *exception_info)
@@ -16,25 +16,6 @@
#ifdef __TI_COMPILER_VERSION__
#ifdef RT_USING_CPU_FFS
int __rt_ffs(int value)
@@ -159,25 +159,6 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
return old_handler;
void rt_hw_trap_irq(void)
int irqno;
@@ -17,17 +17,4 @@
- rt_base_t level;
@@ -167,20 +167,5 @@ void rt_hw_cpu_reset()
/* NEVER REACHED */
@@ -96,23 +96,4 @@ rt_base_t rt_hw_cpu_dcache_status()
return rt_hw_cpu_icache_status();
@@ -169,20 +169,4 @@ void rt_hw_cpu_reset()
- RT_ASSERT(RT_NULL);
@@ -18,19 +18,3 @@ void rt_hw_cpu_reset()
while (1); /* loop forever and wait for reset to happen */
@@ -15,15 +15,6 @@
@@ -34,18 +34,6 @@ void rt_hw_cpu_reset(void)
#define Hit_Invalidate_I 0x10
#define Hit_Invalidate_D 0x11
#define CONFIG_SYS_CACHELINE_SIZE 32
@@ -97,16 +97,3 @@ rt_weak void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_t
return ;
#endif /* end of RT_USING_SMP */
@@ -106,7 +106,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t
@@ -108,7 +108,7 @@ void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t
@@ -174,17 +174,6 @@ void rt_hw_context_switch_interrupt(rt_uint32_t from, rt_uint32_t to)
ENTER_INTERRUPT();
- * shut down the chip
- * @author LXZ (2014/11/8)
* switch to the first thread,it just call one time
@@ -158,16 +158,6 @@ int __rt_ffs(int value)
#endif
void rt_interrupt_enter(void)
@@ -13,21 +13,6 @@
#include "trap.h"
-/*------------ rt_hw_cpu_shutdown() function ----------------------------------
- * DESCRIPTION: Shutdown CPU
- * ARGUMENTS:
- * None
- * RETURNED VALUE: None
------------------------------------------------------------------------------*/
- rt_hw_interrupt_disable();
/*------------ nested_exception_handler() function ---------------------------
* DESCRIPTION: Function handles Nested Exception
* ARGUMENTS:
@@ -260,7 +260,7 @@ void rt_hw_cpu_reset()
@@ -10,14 +10,3 @@
#include <rtthread.h>
@@ -77,6 +77,20 @@ rt_weak void rt_hw_cpu_reset(void)
return;
+rt_weak void rt_hw_cpu_shutdown(void)
+{
+ rt_base_t level;
+ LOG_I("CPU shutdown...");
+ LOG_W("Using default rt_hw_cpu_shutdown()."
+ "Please consider implementing rt_hw_cpu_reset() in another file.");
+ level = rt_hw_interrupt_disable();
+ while (level)
+ {
+ RT_ASSERT(RT_NULL);
+ }
+ return;
+}
+
rt_weak const char *rt_hw_cpu_arch(void)
return "unknown";