2020-04-04 18:51:11 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2019-03-11 07:54:21 +01:00
|
|
|
|
2019-12-03 07:03:27 +01:00
|
|
|
#include <device/mmio.h>
|
2020-12-07 13:43:50 +01:00
|
|
|
#include <soc/mcu_common.h>
|
2019-03-11 07:54:21 +01:00
|
|
|
#include <soc/sspm.h>
|
2020-12-07 13:43:50 +01:00
|
|
|
#include <soc/symbols.h>
|
2019-03-11 07:54:21 +01:00
|
|
|
|
2020-12-07 13:43:50 +01:00
|
|
|
static void reset_sspm(struct mtk_mcu *mcu)
|
|
|
|
{
|
2021-05-27 15:10:17 +02:00
|
|
|
write32(&sspm_reg->sw_rstn, 0x1);
|
2020-12-07 13:43:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct mtk_mcu sspm = {
|
|
|
|
.firmware_name = CONFIG_SSPM_FIRMWARE,
|
|
|
|
.run_address = (void *)SSPM_SRAM_BASE,
|
|
|
|
.reset = reset_sspm,
|
|
|
|
};
|
2019-03-11 07:54:21 +01:00
|
|
|
|
|
|
|
void sspm_init(void)
|
|
|
|
{
|
2020-12-07 13:43:50 +01:00
|
|
|
sspm.load_buffer = _dram_dma;
|
|
|
|
sspm.buffer_size = REGION_SIZE(dram_dma);
|
2019-03-11 07:54:21 +01:00
|
|
|
|
2020-12-07 13:43:50 +01:00
|
|
|
mtk_init_mcu(&sspm);
|
2019-03-11 07:54:21 +01:00
|
|
|
}
|