From d6cea76dfa8d0cb65c22ef55c4947e7d1068dbc3 Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Thu, 4 Aug 2022 15:46:33 +0800 Subject: soc/mediatek: Move common definition of DFD to common folder We use the same dump address and size for DFD in all MediaTek SoCs, so we move them to dfd_common.h and rename dfd_common.h to dfd.h. TEST=build pass BUG=b:236331724 Signed-off-by: Bo-Chen Chen Change-Id: I162bbb0a82e3b55c8cfbbd20e28a54ad01fd6b0d Reviewed-on: https://review.coreboot.org/c/coreboot/+/66585 Reviewed-by: Yidi Lin Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/include/soc/dfd.h | 17 +++++++++++++++++ src/soc/mediatek/common/include/soc/dfd_common.h | 13 ------------- src/soc/mediatek/mt8186/include/soc/dfd.h | 12 ------------ src/soc/mediatek/mt8192/include/soc/dfd.h | 12 ------------ src/soc/mediatek/mt8195/include/soc/dfd.h | 12 ------------ 5 files changed, 17 insertions(+), 49 deletions(-) create mode 100644 src/soc/mediatek/common/include/soc/dfd.h delete mode 100644 src/soc/mediatek/common/include/soc/dfd_common.h delete mode 100644 src/soc/mediatek/mt8186/include/soc/dfd.h delete mode 100644 src/soc/mediatek/mt8192/include/soc/dfd.h delete mode 100644 src/soc/mediatek/mt8195/include/soc/dfd.h (limited to 'src') diff --git a/src/soc/mediatek/common/include/soc/dfd.h b/src/soc/mediatek/common/include/soc/dfd.h new file mode 100644 index 0000000000..fb9dd997bd --- /dev/null +++ b/src/soc/mediatek/common/include/soc/dfd.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_DFD_COMMON_H +#define SOC_MEDIATEK_DFD_COMMON_H + +#define CPC_FLOW_CTRL_CFG 0x0C53A814 +#define RESET_ON_KEEP_EN BIT(17) + +/* DFD dump address and size need to be the same as defined in Kernel DTS. */ +#define DFD_DUMP_ADDRESS 0x6A000000 +#define DFD_DUMP_SIZE (1 * MiB) + +static u32 *const dfd_cfg = (void *)CPC_FLOW_CTRL_CFG; + +void dfd_init(void); + +#endif diff --git a/src/soc/mediatek/common/include/soc/dfd_common.h b/src/soc/mediatek/common/include/soc/dfd_common.h deleted file mode 100644 index d716ed0823..0000000000 --- a/src/soc/mediatek/common/include/soc/dfd_common.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef SOC_MEDIATEK_DFD_COMMON_H -#define SOC_MEDIATEK_DFD_COMMON_H - -#define CPC_FLOW_CTRL_CFG 0x0C53A814 -#define RESET_ON_KEEP_EN BIT(17) - -static u32 *const dfd_cfg = (void *)CPC_FLOW_CTRL_CFG; - -void dfd_init(void); - -#endif diff --git a/src/soc/mediatek/mt8186/include/soc/dfd.h b/src/soc/mediatek/mt8186/include/soc/dfd.h deleted file mode 100644 index b2f1388693..0000000000 --- a/src/soc/mediatek/mt8186/include/soc/dfd.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef SOC_MEDIATEK_MT8186_DFD_H -#define SOC_MEDIATEK_MT8186_DFD_H - -#include - -/* DFD dump address and size need to be the same as defined in Kernel DTS. */ -#define DFD_DUMP_ADDRESS 0x6A000000 -#define DFD_DUMP_SIZE (1 * MiB) - -#endif diff --git a/src/soc/mediatek/mt8192/include/soc/dfd.h b/src/soc/mediatek/mt8192/include/soc/dfd.h deleted file mode 100644 index e225b08060..0000000000 --- a/src/soc/mediatek/mt8192/include/soc/dfd.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef SOC_MEDIATEK_MT8192_DFD_H -#define SOC_MEDIATEK_MT8192_DFD_H - -#include - -/* DFD dump address and size need to be the same as defined in Kernel DTS. */ -#define DFD_DUMP_ADDRESS 0x6A000000 -#define DFD_DUMP_SIZE (1 * MiB) - -#endif diff --git a/src/soc/mediatek/mt8195/include/soc/dfd.h b/src/soc/mediatek/mt8195/include/soc/dfd.h deleted file mode 100644 index 123b568433..0000000000 --- a/src/soc/mediatek/mt8195/include/soc/dfd.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef SOC_MEDIATEK_MT8195_DFD_H -#define SOC_MEDIATEK_MT8195_DFD_H - -#include - -/* DFD dump address and size need to be the same as defined in Kernel DTS. */ -#define DFD_DUMP_ADDRESS 0x6A000000 -#define DFD_DUMP_SIZE (1 * MiB) - -#endif -- cgit v1.2.3