1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/mmio.h>
5 #include <soc/mcu_common.h>
7 #include <soc/symbols.h>
9 #define ABNORMALBOOT_REG 0x0C55FAA0
11 static void reset_mcupm(struct mtk_mcu
*mcu
)
13 /* Clear abnormal boot register */
14 write32p(ABNORMALBOOT_REG
, 0x0);
15 write32(&mcupm_reg
->sw_rstn
, 0x1);
18 static struct mtk_mcu mcupm
= {
19 .firmware_name
= CONFIG_MCUPM_FIRMWARE
,
20 .run_address
= (void *)MCUPM_SRAM_BASE
,
26 mcupm
.load_buffer
= _dram_dma
;
27 mcupm
.buffer_size
= REGION_SIZE(dram_dma
);
29 write32(&mcupm_reg
->sw_rstn
, 0x0);
31 if (mtk_init_mcu(&mcupm
))
32 die("%s() failed\n", __func__
);