aboutsummaryrefslogtreecommitdiff
path: root/src/soc/mediatek/common
diff options
context:
space:
mode:
authorXi Chen <xixi.chen@mediatek.corp-partner.google.com>2021-12-28 17:46:19 +0800
committerHung-Te Lin <hungte@chromium.org>2022-01-24 01:54:28 +0000
commit426ea9670f7d2176fe53f27e723d9db09cf1892a (patch)
tree10d8260987c3d7c352b4d8bdedb82c5157bf5a3b /src/soc/mediatek/common
parent63b53561e1f651f3ca71b925fda4a9567d4a4256 (diff)
soc/mediatek: Extract dramc_param_header to a common header
To be shared with different SOCs, move the dramc_param_header struct as well DRAMC_PARAM_FLAG and DRAMC_PARAM_CONFIG enums to a common header file dramc_param_common.h. TEST=fast calibration pass BUG=b:204226005 Signed-off-by: Xi Chen <xixi.chen@mediatek.corp-partner.google.com> Change-Id: I087971799803e47e34c30063b2b0bd0cfc5795ac Reviewed-on: https://review.coreboot.org/c/coreboot/+/61132 Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/common')
-rw-r--r--src/soc/mediatek/common/include/soc/dramc_param_common.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/soc/mediatek/common/include/soc/dramc_param_common.h b/src/soc/mediatek/common/include/soc/dramc_param_common.h
new file mode 100644
index 0000000000..1b68d61d09
--- /dev/null
+++ b/src/soc/mediatek/common/include/soc/dramc_param_common.h
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __SOC_MEDIATEK_DRAMC_PARAM_COMMON_H__
+#define __SOC_MEDIATEK_DRAMC_PARAM_COMMON_H__
+
+/*
+ * NOTE: This file is shared between coreboot and dram blob. Any change in this
+ * file should be synced to the other repository.
+ */
+
+enum DRAMC_PARAM_FLAG {
+ DRAMC_FLAG_HAS_SAVED_DATA = 0x0001,
+};
+
+enum DRAMC_PARAM_CONFIG {
+ DRAMC_CONFIG_EMCP = 0x0001,
+ DRAMC_CONFIG_DVFS = 0x0002,
+ DRAMC_CONFIG_FAST_K = 0x0004,
+};
+
+struct dramc_param_header {
+ u16 version; /* DRAMC_PARAM_HEADER_VERSION, set in coreboot */
+ u16 size; /* size of whole dramc_param, set in coreboot */
+ u16 status; /* DRAMC_PARAM_STATUS_CODES, set in dram blob */
+ u16 flags; /* DRAMC_PARAM_FLAG, set in dram blob */
+ u16 config; /* DRAMC_PARAM_CONFIG, set in coreboot */
+};
+
+#endif