mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
chickens: Enable NEX power gating on P-cores
It seems we missed this config all along. Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
8f6e13b170
commit
b2a479f1bf
2 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,12 @@ const char *init_cpu(void)
|
|||
else
|
||||
reg_set(SYS_IMP_APL_HID4, HID4_DISABLE_DC_MVA | HID4_DISABLE_DC_SW_L2_OPS);
|
||||
|
||||
/* Enable NEX powergating, the reset cycles might be overriden by chickens */
|
||||
if (!is_ecore()) {
|
||||
reg_mask(SYS_IMP_APL_HID13, HID13_RESET_CYCLES_MASK, HID13_RESET_CYCLES(12));
|
||||
reg_set(SYS_IMP_APL_HID14, HID14_ENABLE_NEX_POWER_GATING);
|
||||
}
|
||||
|
||||
uint64_t midr = mrs(MIDR_EL1);
|
||||
int part = FIELD_GET(MIDR_PART, midr);
|
||||
int rev = (FIELD_GET(MIDR_REV_HIGH, midr) << 4) | FIELD_GET(MIDR_REV_LOW, midr);
|
||||
|
|
|
@ -113,6 +113,9 @@
|
|||
#define HID13_RESET_CYCLES(x) (((unsigned long)x) << 60)
|
||||
#define HID13_RESET_CYCLES_MASK (0xFUL << 60)
|
||||
|
||||
#define SYS_IMP_APL_HID14 sys_reg(3, 0, 15, 15, 0)
|
||||
#define HID14_ENABLE_NEX_POWER_GATING BIT(32)
|
||||
|
||||
#define SYS_IMP_APL_HID16 sys_reg(3, 0, 15, 15, 2)
|
||||
#define HID16_AVL_UNK12 BIT(12)
|
||||
#define HID16_SPAREBIT0 BIT(56)
|
||||
|
|
Loading…
Reference in a new issue