Skip to content

Commit 7aa5367

Browse files
ramesh-thomasnashif
authored andcommitted
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: Ramesh Thomas <[email protected]>
1 parent 05a0c6f commit 7aa5367

File tree

1 file changed

+2
-1
lines changed
  • arch/arc/soc/quark_se_c1000_ss

1 file changed

+2
-1
lines changed

arch/arc/soc/quark_se_c1000_ss/power.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
#include <power.h>
2121
#include <soc_power.h>
2222
#include <init.h>
23+
#include <kernel_structs.h>
2324

2425
#include "ss_power_states.h"
2526

2627
#define SLEEP_MODE_CORE_OFF (0x0)
2728
#define SLEEP_MODE_CORE_TIMERS_RTC_OFF (0x60)
28-
#define ENABLE_INTERRUPTS BIT(4)
29+
#define ENABLE_INTERRUPTS (BIT(4) | _ARC_V2_STATUS32_E(_ARC_V2_DEF_IRQ_LEVEL))
2930

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

0 commit comments

Comments
 (0)