soc/mediatek: Move mtk_dsi_reset() to mtk_dsi_common.c for reuse
Move mtk_dsi_reset() from mtk_mipi_dphy.c to mtk_dsi_common.c so that it can also be used when using the C-PHY interface, improving code reuse. BUG=b:433422905,b:428854543 BRANCH=skywaler TEST=build passed Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com> Change-Id: I3f080127af4411584f66e307f7d2b13abbb051bf Reviewed-on: https://review.coreboot.org/c/coreboot/+/89619 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
668ea97075
commit
6ffbc9a929
6 changed files with 16 additions and 8 deletions
12
src/soc/mediatek/common/mtk_dsi_common.c
Normal file
12
src/soc/mediatek/common/mtk_dsi_common.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
|
||||
|
||||
#include <device/mmio.h>
|
||||
#include <soc/dsi.h>
|
||||
|
||||
void mtk_dsi_reset(void)
|
||||
{
|
||||
write32(&dsi0->dsi_force_commit,
|
||||
DSI_FORCE_COMMIT_USE_MMSYS | DSI_FORCE_COMMIT_ALWAYS);
|
||||
write32(&dsi0->dsi_con_ctrl, 1);
|
||||
write32(&dsi0->dsi_con_ctrl, 0);
|
||||
}
|
||||
|
|
@ -61,11 +61,3 @@ void mtk_dsi_configure_mipi_tx(u32 data_rate, u32 lanes)
|
|||
|
||||
setbits32(&mipi_tx->ck_ckmode_en, DSI_CK_CKMODE_EN);
|
||||
}
|
||||
|
||||
void mtk_dsi_reset(void)
|
||||
{
|
||||
write32(&dsi0->dsi_force_commit,
|
||||
DSI_FORCE_COMMIT_USE_MMSYS | DSI_FORCE_COMMIT_ALWAYS);
|
||||
write32(&dsi0->dsi_con_ctrl, 1);
|
||||
write32(&dsi0->dsi_con_ctrl, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ ramstage-y += ../common/i2c.c i2c.c
|
|||
ramstage-y += ../common/mcu.c
|
||||
ramstage-y += ../common/mmu_operations.c mmu_operations.c
|
||||
ramstage-y += ../common/mtcmos.c mtcmos.c
|
||||
ramstage-y += ../common/mtk_dsi_common.c
|
||||
ramstage-y += ../common/pmic_wrap.c
|
||||
ramstage-y += ../common/rtc.c ../common/rtc_pwrap_ops.c ../common/rtc_osc_init.c rtc.c
|
||||
ramstage-y += soc.c
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ ramstage-y += ../common/mcu.c
|
|||
ramstage-y += ../common/mmu_operations.c
|
||||
ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
|
||||
ramstage-y += ../common/mtcmos.c mtcmos.c
|
||||
ramstage-y += ../common/mtk_dsi_common.c
|
||||
ramstage-y += ../common/pmic_wrap.c pmic_wrap.c pmif.c mt6366.c
|
||||
ramstage-y += ../common/rtc.c ../common/rtc_pwrap_ops.c ../common/rtc_osc_init.c rtc.c
|
||||
ramstage-y += soc.c
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ ramstage-y += ../common/mmu_operations.c
|
|||
ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
|
||||
ramstage-y += ../common/mt6359p.c mt6359p.c
|
||||
ramstage-y += ../common/mtcmos.c mtcmos.c
|
||||
ramstage-y += ../common/mtk_dsi_common.c
|
||||
ramstage-y += ../common/pmif.c ../common/pmif_clk.c ../common/pmif_init.c pmif_clk.c
|
||||
ramstage-y += ../common/pmif_spi.c pmif_spi.c
|
||||
ramstage-y += ../common/pmif_spmi.c ../common/pmif_spmi_v1.c pmif_spmi.c
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ ramstage-y += ../common/mcupm.c
|
|||
ramstage-y += ../common/mmu_operations.c
|
||||
ramstage-$(CONFIG_COMMONLIB_STORAGE_MMC) += ../common/msdc.c msdc.c
|
||||
ramstage-y += ../common/mtcmos.c mtcmos.c
|
||||
ramstage-y += ../common/mtk_dsi_common.c
|
||||
ramstage-y += ../common/pmif.c ../common/pmif_init.c
|
||||
ramstage-y += ../common/rtc.c ../common/rtc_mt6359p.c
|
||||
ramstage-y += soc.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue