summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8192/include
diff options
context:
space:
mode:
authorBo-Chen Chen <rex-bc.chen@mediatek.com>2022-08-29 19:09:38 +0800
committerFelix Held <felix-coreboot@felixheld.de>2022-08-31 16:47:52 +0000
commit9d638a95167781671dd0f982b1e6c2194c7f22eb (patch)
treea43e20a14c4a4caef0691818a7121532b6143f75 /src/soc/mediatek/mt8192/include
parentdcdbda5c93bedbce202e2f55903a7f52dd4f84f6 (diff)
soc/mediatek: Move some SPM functions to common
Some functions are the same in spm.c for MT8192, MT8195, MT8186 and MT8188, so we move them to common/spm.c. TEST=build pass. BUG=b:236331724 Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com> Change-Id: I29ddefc47d8bd156fa1ca0cedd4deaed676ae7e4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66972 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8192/include')
-rw-r--r--src/soc/mediatek/mt8192/include/soc/spm.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/soc/mediatek/mt8192/include/soc/spm.h b/src/soc/mediatek/mt8192/include/soc/spm.h
index 4951f13ccb..4c24a48220 100644
--- a/src/soc/mediatek/mt8192/include/soc/spm.h
+++ b/src/soc/mediatek/mt8192/include/soc/spm.h
@@ -3,8 +3,10 @@
#ifndef SOC_MEDIATEK_MT8192_SPM_H
#define SOC_MEDIATEK_MT8192_SPM_H
+#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/mtcmos.h>
+#include <soc/spm_common.h>
#include <types.h>
/* SPM READ/WRITE CFG */
@@ -51,7 +53,7 @@
#define SYS_TIMER_START_EN_LSB (1U << 0) /* 1b */
/* MD32PCM_CFGREG_SW_RSTN (0x10006000+0xA00) */
-#define MD32PCM_CFGREG_SW_RSTN_RESET (1U << 0) /* 1b */
+DEFINE_BIT(MD32PCM_CFGREG_SW_RSTN_RESET, 0)
/**************************************
* Config and Parameter
@@ -660,20 +662,6 @@ check_member(mtk_spm_regs, md32pcm_dma0_rlct, 0xc24);
static struct mtk_spm_regs *const mtk_spm = (void *)SPM_BASE;
-struct pcm_desc {
- u32 pmem_words;
- u32 total_words;
- u32 pmem_start;
- u32 dmem_start;
-};
-
-struct dyna_load_pcm {
- u8 *buf; /* binary array */
- struct pcm_desc desc;
-};
-
-int spm_init(void);
-
static const struct power_domain_data disp[] = {
{
.pwr_con = &mtk_spm->dis_pwr_con,