e235f9a56b
The SSPM driver can be shared by MT8183, MT8192 and MT8195. TEST=emerge-{asurada, kukui} coreboot; Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: If9779853becb298eeeabb3dc6096bc474baae202 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55050 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
25 lines
489 B
C
25 lines
489 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#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(&sspm_reg->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);
|
|
}
|