coreboot-kgpe-d16/src/soc/mediatek/mt8186/mtcmos.c
Chun-Jie Chen c7e17bce06 soc/mediatek/mt8186: Add mtcmos init support
Add mtcmos to support display and audio.

TEST=build pass
BUG=b:202871018

Signed-off-by: Chun-Jie Chen <chun-jie.chen@mediatek.com>
Change-Id: Ib9d41d47f235376f524c3ff78f1fcc069cbc60cd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59343
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2021-11-17 10:31:23 +00:00

23 lines
533 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/mmio.h>
#include <soc/infracfg.h>
#include <soc/mtcmos.h>
enum {
DISP_PROT_STEP_2_MASK = 0x00000C06,
DISP_PROT_STEP_1_MASK = 0x00001800,
};
void mtcmos_protect_display_bus(void)
{
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_clr,
DISP_PROT_STEP_2_MASK);
write32(&mt8186_infracfg_ao->infra_topaxi_protecten_1_clr,
DISP_PROT_STEP_1_MASK);
}
void mtcmos_protect_audio_bus(void)
{
/* No need to do protection since MT8186 doesn't have audio mtcmos. */
}