Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1ddb6fe authored by Jingbiao Lu's avatar Jingbiao Lu Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: socinfo: Add support for msm8937 soc-id



Add support for getting soc-id and dummy handle
on msm8937.

Change-Id: I7a592b4cefbbe6054bd62469bbeb6bf58e59156f
Signed-off-by: default avatarJingbiao Lu <jingbiao@codeaurora.org>
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
parent 7677882b
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2009-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt) "%s: " fmt, __func__
@@ -356,6 +356,11 @@ static struct msm_soc_info cpu_of_id[] = {
	/* BENGALP-IOT ID */
	[470] = {MSM_CPU_BENGALP_IOT, "BENGALP-IOT"},

	/* MSM8937 ID */
	[294] = {MSM_CPU_8937, "MSM8937"},
	[295] = {MSM_CPU_8937, "APQ8937"},


	/* Uninitialized IDs are not known to run Linux.
	 * MSM_CPU_UNKNOWN is set to 0 to ensure these IDs are
	 * considered as unknown CPU.
@@ -1283,6 +1288,10 @@ static void * __init setup_dummy_socinfo(void)
		dummy_socinfo.id = 470;
		strlcpy(dummy_socinfo.build_id, "bengalp-iot - ",
		sizeof(dummy_socinfo.build_id));
	} else if (early_machine_is_msm8937()) {
		dummy_socinfo.id = 294;
		strlcpy(dummy_socinfo.build_id, "msm8937 - ",
		sizeof(dummy_socinfo.build_id));
	} else
		strlcat(dummy_socinfo.build_id, "Dummy socinfo",
			sizeof(dummy_socinfo.build_id));
+5 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2009-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _ARCH_ARM_MACH_MSM_SOCINFO_H_
@@ -86,6 +86,8 @@
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,bengal-iot")
#define early_machine_is_bengalp_iot()	\
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,bengalp-iot")
#define early_machine_is_msm8937()	\
	of_flat_dt_is_compatible(of_get_flat_dt_root(), "qcom,msm8937")
#else
#define of_board_is_sim()		0
#define of_board_is_rumi()		0
@@ -123,6 +125,7 @@
#define early_machine_is_sdm660()	0
#define early_machine_is_bengal_iot()	0
#define early_machine_is_bengalp_iot()	0
#define early_machine_is_msm8937()	0
#endif

#define PLATFORM_SUBTYPE_MDM	1
@@ -162,6 +165,7 @@ enum msm_cpu {
	MSM_CPU_SDMMAGPIE,
	MSM_CPU_BENGAL_IOT,
	MSM_CPU_BENGALP_IOT,
	MSM_CPU_8937,
};

struct msm_soc_info {