summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8192/sspm.c
blob: b36e0df6f960b96aebdf68da3be7f0b848373f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* SPDX-License-Identifier: GPL-2.0-only */

#include <console/console.h>
#include <device/mmio.h>
#include <soc/mcu_common.h>
#include <soc/sspm.h>
#include <soc/symbols.h>

static void reset_sspm(struct mtk_mcu *mcu)
{
	write32(&mt8192_sspm->sw_rstn, 0x1);
}

static struct mtk_mcu sspm = {
	.firmware_name = CONFIG_SSPM_FIRMWARE,
	.run_address = (void *)SSPM_SRAM_BASE,
	.reset = reset_sspm,
};

void sspm_init(void)
{
	sspm.load_buffer = _dram_dma;
	sspm.buffer_size = REGION_SIZE(dram_dma);

	mtk_init_mcu(&sspm);
}