drivers/pc80/pc: Clean up formatting of PS/2 related ASL code
[coreboot.git] / src / soc / mediatek / common / mcupm.c
blob9e58f073d95d31f032555a00524a40ae61c257e2
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/mmio.h>
5 #include <soc/mcu_common.h>
6 #include <soc/mcupm.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,
21 .reset = reset_mcupm,
24 void mcupm_init(void)
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__);