risc-v: Support customize idle loop
Support customize idle loop by CONFIG_ARCH_IDLE_CUSTOM as other architectures. Then user can provide their own `up_idle()` function with CONFIG_ARCH_IDLE_CUSTOM enabled. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
aa03182bab
commit
52bb516d37
2 changed files with 10 additions and 3 deletions
|
|
@ -25,8 +25,7 @@ list(APPEND SRCS riscv_saveusercontext.S)
|
|||
list(APPEND SRCS riscv_allocateheap.c riscv_cpuidlestack.c)
|
||||
list(APPEND SRCS riscv_cpuinfo.c riscv_createstack.c riscv_doirq.c
|
||||
riscv_exception.c)
|
||||
list(APPEND SRCS riscv_exit.c riscv_getintstack.c riscv_getnewintctx.c
|
||||
riscv_idle.c)
|
||||
list(APPEND SRCS riscv_exit.c riscv_getintstack.c riscv_getnewintctx.c)
|
||||
list(APPEND SRCS riscv_initialize.c riscv_initialstate.c riscv_modifyreg32.c)
|
||||
list(APPEND SRCS riscv_mtimer.c riscv_nputs.c riscv_registerdump.c)
|
||||
list(APPEND SRCS riscv_releasestack.c riscv_schedulesigaction.c
|
||||
|
|
@ -34,6 +33,10 @@ list(APPEND SRCS riscv_releasestack.c riscv_schedulesigaction.c
|
|||
list(APPEND SRCS riscv_stackframe.c riscv_tcbinfo.c riscv_swint.c)
|
||||
list(APPEND SRCS riscv_switchcontext.c riscv_usestack.c)
|
||||
|
||||
if(NOT CONFIG_ARCH_IDLE_CUSTOM)
|
||||
list(APPEND SRCS riscv_idle.c)
|
||||
endif()
|
||||
|
||||
if(NOT CONFIG_ALARM_ARCH)
|
||||
if(NOT CONFIG_TIMER_ARCH)
|
||||
list(APPEND SRCS riscv_mdelay.c riscv_udelay.c)
|
||||
|
|
|
|||
|
|
@ -31,11 +31,15 @@ CMN_CSRCS += riscv_initialize.c riscv_swint.c riscv_mtimer.c
|
|||
CMN_CSRCS += riscv_allocateheap.c riscv_createstack.c riscv_cpuinfo.c
|
||||
CMN_CSRCS += riscv_cpuidlestack.c riscv_doirq.c riscv_exit.c riscv_exception.c
|
||||
CMN_CSRCS += riscv_getnewintctx.c riscv_getintstack.c riscv_initialstate.c
|
||||
CMN_CSRCS += riscv_idle.c riscv_modifyreg32.c riscv_nputs.c riscv_releasestack.c
|
||||
CMN_CSRCS += riscv_modifyreg32.c riscv_nputs.c riscv_releasestack.c
|
||||
CMN_CSRCS += riscv_registerdump.c riscv_stackframe.c riscv_schedulesigaction.c
|
||||
CMN_CSRCS += riscv_sigdeliver.c riscv_switchcontext.c
|
||||
CMN_CSRCS += riscv_usestack.c riscv_tcbinfo.c
|
||||
|
||||
ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
|
||||
CMN_CSRCS += riscv_idle.c
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ALARM_ARCH),y)
|
||||
ifneq ($(CONFIG_TIMER_ARCH),y)
|
||||
CMN_CSRCS += riscv_mdelay.c riscv_udelay.c
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue