Yidi Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85625?usp=email )
(
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: soc/mediatek/common: Move SPM_SYSTEM_BASE_OFFSET to soc folders ......................................................................
soc/mediatek/common: Move SPM_SYSTEM_BASE_OFFSET to soc folders
MT8196's SPM_SYSTEM_BASE_OFFSET has a different offset due to the hardware design. To avoid adding a new kconfig for differentiation, migrate this definition into SoC specific value.
BUG=none TEST=emerge-geralt coreboot && emerge-corsola coreboot
Change-Id: I5df510d5d05a0594d87e7e96e1e03e20a018785f Signed-off-by: Yidi Lin yidilin@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/85625 Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/common/include/soc/spm_common.h M src/soc/mediatek/mt8186/include/soc/spm.h M src/soc/mediatek/mt8188/include/soc/spm.h M src/soc/mediatek/mt8192/include/soc/spm.h M src/soc/mediatek/mt8195/include/soc/spm.h 5 files changed, 7 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/common/include/soc/spm_common.h b/src/soc/mediatek/common/include/soc/spm_common.h index 6a65b2c..f45b59e 100644 --- a/src/soc/mediatek/common/include/soc/spm_common.h +++ b/src/soc/mediatek/common/include/soc/spm_common.h @@ -5,8 +5,6 @@
#include <soc/mcu_common.h>
-#define SPM_SYSTEM_BASE_OFFSET 0x40000000 - struct pcm_desc { u32 pmem_words; u32 total_words; diff --git a/src/soc/mediatek/mt8186/include/soc/spm.h b/src/soc/mediatek/mt8186/include/soc/spm.h index cffc523..9368916 100644 --- a/src/soc/mediatek/mt8186/include/soc/spm.h +++ b/src/soc/mediatek/mt8186/include/soc/spm.h @@ -14,6 +14,7 @@ #include <soc/spm_common.h> #include <types.h>
+#define SPM_SYSTEM_BASE_OFFSET 0x40000000 #define SPM_INIT_DONE_US 20
#define CLK_SCP_CFG_0 (IO_PHYS + 0x200) diff --git a/src/soc/mediatek/mt8188/include/soc/spm.h b/src/soc/mediatek/mt8188/include/soc/spm.h index 043a102..529ad18 100644 --- a/src/soc/mediatek/mt8188/include/soc/spm.h +++ b/src/soc/mediatek/mt8188/include/soc/spm.h @@ -9,6 +9,8 @@ #include <soc/spm_common.h> #include <types.h>
+#define SPM_SYSTEM_BASE_OFFSET 0x40000000 + /* SPM READ/WRITE CFG */ #define SPM_PROJECT_CODE 0xb16 #define SPM_REGWR_CFG_KEY (SPM_PROJECT_CODE << 16) diff --git a/src/soc/mediatek/mt8192/include/soc/spm.h b/src/soc/mediatek/mt8192/include/soc/spm.h index cc5052b..065053a 100644 --- a/src/soc/mediatek/mt8192/include/soc/spm.h +++ b/src/soc/mediatek/mt8192/include/soc/spm.h @@ -9,6 +9,8 @@ #include <soc/spm_common.h> #include <types.h>
+#define SPM_SYSTEM_BASE_OFFSET 0x40000000 + /* SPM READ/WRITE CFG */ #define SPM_PROJECT_CODE 0xb16 #define SPM_REGWR_CFG_KEY (SPM_PROJECT_CODE << 16) diff --git a/src/soc/mediatek/mt8195/include/soc/spm.h b/src/soc/mediatek/mt8195/include/soc/spm.h index c118f06..67873ec 100644 --- a/src/soc/mediatek/mt8195/include/soc/spm.h +++ b/src/soc/mediatek/mt8195/include/soc/spm.h @@ -9,6 +9,8 @@ #include <soc/spm_common.h> #include <types.h>
+#define SPM_SYSTEM_BASE_OFFSET 0x40000000 + /* SPM READ/WRITE CFG */ #define SPM_PROJECT_CODE 0xb16 #define SPM_REGWR_CFG_KEY (SPM_PROJECT_CODE << 16)