arch: arc: remove unused codes and definition
Signed-off-by: Jingru <jingru@synopsys.com>
This commit is contained in:
@@ -57,7 +57,7 @@ __PORT__ void port_systick_config(uint32_t cycle_per_tick) // Configure SysTick
|
||||
}
|
||||
__PORT__ void port_systick_priority_set(uint32_t prio) // Sets the int priority
|
||||
{
|
||||
int_pri_set(INTNO_TIMER0, prio); // get system tick from timer 0 arc_timer.h
|
||||
int_pri_set(BOARD_OS_TIMER_INTNO, prio); // get system tick from timer 0 arc_timer.h
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,6 @@ __PORT__ void port_systick_reload(uint32_t cycle_per_tick)
|
||||
|
||||
__PORT__ void port_systick_pending_reset(void)
|
||||
{
|
||||
// SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk;
|
||||
arc_aux_write(AUX_TIMER0_CTRL, TIMER_CTRL_IP); // interrupt pending
|
||||
}
|
||||
|
||||
@@ -132,14 +131,11 @@ __PORT__ void port_standby_mode_enter(void)
|
||||
__STATIC__ void port_fault_do_diagnosis(port_fault_regs_t *regs) // 硬件错误诊断
|
||||
{
|
||||
k_fault_log_writer("\n\n====================== Fault Diagnosis =====================\n");
|
||||
|
||||
|
||||
}
|
||||
|
||||
__PORT__ void port_fault_diagnosis(void)
|
||||
{
|
||||
k_fault_log_writer("\n\n====================== Fault Diagnosis .. =====================\n");
|
||||
|
||||
}
|
||||
|
||||
__PORT__ void __NAKED__ HardFault_Handler(void)
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _PORT_CONFIG_H_
|
||||
#define _PORT_CONFIG_H_
|
||||
#define _PORT_CONFIG_H_
|
||||
|
||||
#define TOS_CFG_CPU_ADDR_SIZE CPU_WORD_SIZE_32
|
||||
#define TOS_CFG_CPU_DATA_SIZE CPU_WORD_SIZE_32
|
||||
|
@@ -11,6 +11,7 @@
|
||||
.global k_curr_task
|
||||
.global k_next_task
|
||||
|
||||
.global g_exc_nest_count
|
||||
.global g_context_switch_reqflg
|
||||
|
||||
.global tos_knl_irq_enter
|
||||
@@ -145,9 +146,9 @@ exc_entry_cpu:
|
||||
mov blink, sp
|
||||
mov r3, sp /* as exception handler's para(p_excinfo) */
|
||||
|
||||
ld r0, [k_irq_nest_cnt]
|
||||
ld r0, [g_exc_nest_count]
|
||||
add r1, r0, 1
|
||||
st r1, [k_irq_nest_cnt]
|
||||
st r1, [g_exc_nest_count]
|
||||
brne r0, 0, exc_handler_1
|
||||
/* change to exception stack if interrupt happened in task context */
|
||||
mov sp, _e_stack
|
||||
@@ -169,7 +170,7 @@ exc_handler_1:
|
||||
/* interrupts are not allowed */
|
||||
ret_exc:
|
||||
POP sp
|
||||
mov r1, k_irq_nest_cnt
|
||||
mov r1, g_exc_nest_count
|
||||
ld r0, [r1]
|
||||
sub r0, r0, 1
|
||||
st r0, [r1]
|
||||
@@ -236,9 +237,9 @@ exc_entry_int:
|
||||
mov blink, sp
|
||||
|
||||
clri /* disable interrupt */
|
||||
ld r3, [k_irq_nest_cnt]
|
||||
ld r3, [g_exc_nest_count]
|
||||
add r2, r3, 1
|
||||
st r2, [k_irq_nest_cnt]
|
||||
st r2, [g_exc_nest_count]
|
||||
seti /* enable higher priority interrupt */
|
||||
|
||||
brne r3, 0, irq_handler_1
|
||||
@@ -282,7 +283,7 @@ ret_int:
|
||||
clri /* disable interrupt */
|
||||
POP r3 /* irq priority */
|
||||
POP sp
|
||||
mov r1, k_irq_nest_cnt
|
||||
mov r1, g_exc_nest_count
|
||||
ld r0, [r1]
|
||||
sub r0, r0, 1
|
||||
st r0, [r1]
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <tos_k.h>
|
||||
#include "embARC.h"
|
||||
|
||||
void tos_cup_tick_handler(void)
|
||||
void tos_cpu_tick_handler(void)
|
||||
{
|
||||
arc_timer_int_clear(BOARD_OS_TIMER_ID);
|
||||
tos_tick_handler();
|
||||
@@ -115,7 +115,7 @@ __KNL__ void cpu_systick_init(k_cycle_t cycle_per_tick)
|
||||
arc_timer_stop(BOARD_OS_TIMER_ID);
|
||||
arc_timer_start(BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cycle_per_tick);
|
||||
|
||||
int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)tos_cup_tick_handler);
|
||||
int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)tos_cpu_tick_handler);
|
||||
int_pri_set(BOARD_OS_TIMER_INTNO, INT_PRI_MIN + 1);
|
||||
int_enable(BOARD_OS_TIMER_INTNO);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ __KNL__ void cpu_standby_mode_enter(void)
|
||||
#endif /* TOS_CFG_PWR_MGR_EN */
|
||||
|
||||
uint32_t g_context_switch_reqflg;
|
||||
|
||||
uint32_t g_exc_nest_count;
|
||||
extern void start_r(void);
|
||||
|
||||
#if ARC_FEATURE_STACK_CHECK
|
||||
|
Reference in New Issue
Block a user