Skip to content

Commit 68be678

Browse files
tmlemanhenrikbrixandersen
authored andcommitted
intel_adsp: tlb: Configure HPSRAM retention mode after power transitions
Explicitly configure retention mode when powering up HPSRAM banks to ensure consistent behavior across hardware platforms. After D3 power state transitions, the retention mode configuration can become undefined due to hardware reset. This causes test failures in NVL FPGA testing environment where the hardware strictly enforces retention mode settings. The fix ensures retention mode is properly set in two locations: - sys_mm_drv_hpsram_pwr(): Configure retention mode for all bank power-up operations - adsp_mm_restore_context(): Explicitly set retention mode during D3->D0 restore sequence after each bank is powered up Signed-off-by: Tomasz Leman <[email protected]>
1 parent a1adced commit 68be678

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/mm/mm_drv_intel_adsp_mtl_tlb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ static int sys_mm_drv_hpsram_pwr(uint32_t bank_idx, bool enable, bool non_blocki
149149

150150
HPSRAM_REGS(bank_idx)->HSxPGCTL = !enable;
151151

152+
if (enable) {
153+
HPSRAM_REGS(bank_idx)->HSxRMCTL = IS_ENABLED(CONFIG_SRAM_RETENTION_MODE);
154+
}
155+
152156
if (!non_blocking) {
153157
while (HPSRAM_REGS(bank_idx)->HSxPGISTS == enable) {
154158
k_busy_wait(1);
@@ -911,6 +915,7 @@ __imr void adsp_mm_restore_context(void *storage_buffer)
911915
/* turn on memory bank power, wait till the power is on */
912916
__ASSERT_NO_MSG(bank_idx <= ace_hpsram_get_bank_count());
913917
HPSRAM_REGS(bank_idx)->HSxPGCTL = 0;
918+
HPSRAM_REGS(bank_idx)->HSxRMCTL = IS_ENABLED(CONFIG_SRAM_RETENTION_MODE);
914919
while (HPSRAM_REGS(bank_idx)->HSxPGISTS == 1) {
915920
/* k_busy_wait cannot be used here - not available */
916921
}

0 commit comments

Comments
 (0)