summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8195/scp.c
blob: 0b7d8de491af6f2364df2e2496949ca8a1490c88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */

#include <device/mmio.h>
#include <soc/scp.h>

void scp_rsi_enable(void)
{
	u32 val;

	for (val = SCP_SRAM_PDN_DISABLE_VAL; val != 0U;) {
		val = val >> 1;
		write32(REG_L1TCM_SRAM_PDN, val);
	}
}

void scp_rsi_disable(void)
{
	write32(REG_L1TCM_SRAM_PDN, SCP_SRAM_PDN_DISABLE_VAL);
}