Commit 7aa53678 authored by Ramesh Thomas's avatar Ramesh Thomas Committed by Anas Nashif
Browse files

quark_se_ss: power_mgmt: Fix a bug in call to sleep instruction



When sleep instruction is called with interrupts enabled, the
interrupt priority threshold bits need to be set. Only interrupts
with equal or higher priority will wake the sleep. Currently it
is set to 0 unintentionally and only priority 0 interrupt can
wake the sleep.

Jira: ZEP-1349
Change-Id: I927e259345cc37c5ecc4dfdcde996dd16443e61b
Signed-off-by: default avatarRamesh Thomas <ramesh.thomas@intel.com>
parent 05a0c6fe
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -20,12 +20,13 @@
#include <power.h>
#include <soc_power.h>
#include <init.h>
#include <kernel_structs.h>

#include "ss_power_states.h"

#define SLEEP_MODE_CORE_OFF (0x0)
#define SLEEP_MODE_CORE_TIMERS_RTC_OFF (0x60)
#define ENABLE_INTERRUPTS BIT(4)
#define ENABLE_INTERRUPTS (BIT(4) | _ARC_V2_STATUS32_E(_ARC_V2_DEF_IRQ_LEVEL))

#define ARC_SS1 (SLEEP_MODE_CORE_OFF | ENABLE_INTERRUPTS)
#define ARC_SS2 (SLEEP_MODE_CORE_TIMERS_RTC_OFF | ENABLE_INTERRUPTS)