From 6ad80f1b81d08e6c1400eaceb710887371254894 Mon Sep 17 00:00:00 2001 From: Rex-BC Chen Date: Mon, 17 Oct 2022 20:49:08 +0800 Subject: soc/mediatek/mt8186: Add support for reading CPU ID MT8186 has two slightly different versions: MT8186G and MT8186T (turbo version). Add get_cpu_id() to identify different CPUs. BUG=b:249436110 TEST=cpu id is correct. BRANCH=corsola Signed-off-by: Bo-Chen Chen Change-Id: I0612dd589e11853dbddc1d99526e9c9bf170acec Reviewed-on: https://review.coreboot.org/c/coreboot/+/68576 Reviewed-by: Yu-Ping Wu Reviewed-by: Yidi Lin Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/include/soc/cpu_id.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/soc/mediatek/common/include/soc/cpu_id.h (limited to 'src/soc/mediatek/common/include') diff --git a/src/soc/mediatek/common/include/soc/cpu_id.h b/src/soc/mediatek/common/include/soc/cpu_id.h new file mode 100644 index 0000000000..9453a15864 --- /dev/null +++ b/src/soc/mediatek/common/include/soc/cpu_id.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_COMMON_CPU_ID_H +#define SOC_MEDIATEK_COMMON_CPU_ID_H + +#define MTK_CPU_ID_MT8186G 0x81861001 +#define MTK_CPU_ID_MT8186T 0x81862001 + +u32 get_cpu_id(void); + +#endif /* SOC_MEDIATEK_COMMON_CPU_ID_H */ -- cgit v1.2.3