mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-29 01:40:18 +00:00
chickens: set WFI mode to clockgate only
This preserves CPU registers. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
64e6595f64
commit
aaab2c6ca1
2 changed files with 5 additions and 3 deletions
|
@ -129,9 +129,9 @@ const char *init_cpu(void)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Unmask external IRQs */
|
||||
reg_mask(SYS_CYC_OVRD, CYC_OVRD_FIQ_MODE_MASK | CYC_OVRD_IRQ_MODE_MASK,
|
||||
CYC_OVRD_FIQ_MODE(0) | CYC_OVRD_IRQ_MODE(0));
|
||||
/* Unmask external IRQs, set WFI mode to up (2) */
|
||||
reg_mask(SYS_CYC_OVRD, CYC_OVRD_FIQ_MODE_MASK | CYC_OVRD_IRQ_MODE_MASK | CYC_OVRD_WFI_MODE_MASK,
|
||||
CYC_OVRD_FIQ_MODE(0) | CYC_OVRD_IRQ_MODE(0) | CYC_OVRD_WFI_MODE(2));
|
||||
|
||||
/* Enable branch prediction state retention across ACC sleep */
|
||||
reg_mask(SYS_ACC_CFG, ACC_CFG_BP_SLEEP_MASK, ACC_CFG_BP_SLEEP(3));
|
||||
|
|
|
@ -101,3 +101,5 @@
|
|||
#define CYC_OVRD_FIQ_MODE_MASK (3UL << 20)
|
||||
#define CYC_OVRD_IRQ_MODE(x) (((unsigned long)x) << 22)
|
||||
#define CYC_OVRD_IRQ_MODE_MASK (3UL << 22)
|
||||
#define CYC_OVRD_WFI_MODE(x) (((unsigned long)x) << 24)
|
||||
#define CYC_OVRD_WFI_MODE_MASK (3UL << 20)
|
||||
|
|
Loading…
Reference in a new issue