From a3317182ff8f01c6232609e9c210d736b6050374 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Thu, 11 Dec 2025 06:42:09 +0800 Subject: [PATCH] soc/mediatek/common: Move dsi0 definition to dsi_register_v*.h Move dsi0 variable definition to dsi_register_v*.h to be closer to the register struct definition. This also allows us to define dsi1 for mt8196 at the same place as dsi0 in a future patch. The dsi1 variable cannot be defined in dsi_common.h because not all MediaTek SoCs using the header have the DSI1_BASE register. BUG=b:424782827 TEST=util/abuild/abuild -x -t GOOGLE_SAPPHIRE -a BRANCH=none Change-Id: I643f8d0317d0fb8bd8ea7bf8870ec99051c35c1b Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/90452 Reviewed-by: Yidi Lin Reviewed-by: Chen-Tsung Hsieh Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/include/soc/dsi_common.h | 2 -- src/soc/mediatek/common/include/soc/dsi_register_v1.h | 2 ++ src/soc/mediatek/common/include/soc/dsi_register_v2.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/soc/mediatek/common/include/soc/dsi_common.h b/src/soc/mediatek/common/include/soc/dsi_common.h index 83f6254777..c166f62e2f 100644 --- a/src/soc/mediatek/common/include/soc/dsi_common.h +++ b/src/soc/mediatek/common/include/soc/dsi_common.h @@ -10,8 +10,6 @@ #include #include -static struct dsi_regs *const dsi0 = (void *)DSI0_BASE; - /* DSI_INTSTA */ enum { LPRX_RD_RDY_INT_FLAG = BIT(0), diff --git a/src/soc/mediatek/common/include/soc/dsi_register_v1.h b/src/soc/mediatek/common/include/soc/dsi_register_v1.h index ec5dfdac63..3f9f4cb543 100644 --- a/src/soc/mediatek/common/include/soc/dsi_register_v1.h +++ b/src/soc/mediatek/common/include/soc/dsi_register_v1.h @@ -53,4 +53,6 @@ check_member(dsi_regs, dsi_vm_cmd_con, 0x130); check_member(dsi_regs, dsi_force_commit, 0x190); check_member(dsi_regs, dsi_cmdq, 0x200); +static struct dsi_regs *const dsi0 = (void *)DSI0_BASE; + #endif /* DSI_REGISTER_V1_H */ diff --git a/src/soc/mediatek/common/include/soc/dsi_register_v2.h b/src/soc/mediatek/common/include/soc/dsi_register_v2.h index 5c26ba51af..193c96ecb3 100644 --- a/src/soc/mediatek/common/include/soc/dsi_register_v2.h +++ b/src/soc/mediatek/common/include/soc/dsi_register_v2.h @@ -58,4 +58,6 @@ check_member(dsi_regs, dsi_vm_cmd_con, 0x130); check_member(dsi_regs, dsi_force_commit, 0x190); check_member(dsi_regs, dsi_cmdq, 0xd00); +static struct dsi_regs *const dsi0 = (void *)DSI0_BASE; + #endif /* DSI_REGISTER_V2_H */