tests: legacy: kernel: context: account for riscv32 architecture

Added TICK_IRQ definition for CONFIG_PULPINO_TIMER and
CONFIG_RISCV_QEMU_TIMER

skip definition of HAS_POWERSAVE_INSTRUCTION for
CONFIG_SOC_RISCV32_QEMU, since it does not provide
power saving instruction.

Otherwise, not passing sanitycheck.

Change-Id: I2faa823226cd76d129d2bc3db961c9b862aaf784
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
This commit is contained in:
Jean-Paul Etienne 2017-01-11 00:24:31 +01:00 committed by Andrew Boie
commit 142e3cb0f3

View file

@ -66,6 +66,10 @@
#define TICK_IRQ TIMER_0_IRQ
#elif defined(CONFIG_ARCV2_TIMER)
#define TICK_IRQ IRQ_TIMER0
#elif defined(CONFIG_PULPINO_TIMER)
#define TICK_IRQ PULP_TIMER_A_CMP_IRQ
#elif defined(CONFIG_RISCV_QEMU_TIMER)
#define TICK_IRQ RISCV_QEMU_TIMER_IRQ
#elif defined(CONFIG_CPU_CORTEX_M)
/*
* The Cortex-M use the SYSTICK exception for the system timer, which is
@ -76,10 +80,12 @@
#error Timer type is not defined for this platform
#endif
/* Nios II doesn't have a power saving instruction, so nano_cpu_idle()
/* Nios II and RISCV32 without CONFIG_RISCV_HAS_CPU_IDLE
* do not have a power saving instruction, so nano_cpu_idle()
* returns immediately
*/
#if !defined(CONFIG_NIOS2)
#if !defined(CONFIG_NIOS2) && \
(!defined(CONFIG_RISCV32) || defined(CONFIG_RISCV_HAS_CPU_IDLE))
#define HAS_POWERSAVE_INSTRUCTION
#endif