Netdev List
 help / color / mirror / Atom feed
From: Konrad Dybcio <konradybcio@kernel.org>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
	Sean Paul <sean@poorly.run>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	 Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	 Dmitry Baryshkov <lumag@kernel.org>,
	 Abhinav Kumar <abhinav.kumar@linux.dev>,
	 Jessica Zhang <jesszhan0024@gmail.com>,
	 Marijn Suijten <marijn.suijten@somainline.org>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	 Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	 Bryan O'Donoghue <bod@kernel.org>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	Alex Elder <elder@kernel.org>,
	 Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	 Bjorn Andersson <andersson@kernel.org>,
	 Mathieu Poirier <mathieu.poirier@linaro.org>,
	 Sumit Garg <sumit.garg@oss.qualcomm.com>,
	Abel Vesa <abelvesa@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	 freedreno@lists.freedesktop.org, linux-media@vger.kernel.org,
	 netdev@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: [PATCH] treewide: Centralize Qualcomm PAS IDs
Date: Wed, 02 Dec 2026 11:26:57 +0100	[thread overview]
Message-ID: <20261202-topic-pas_id-v1-1-23fc20faa6dc@oss.qualcomm.com> (raw)

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

The PAS functions take a unique ID, assigned to a concrete firmware
binary type. Centralize them in the PAS header to better reflect that
and make reasoning about the missing ones easier.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Unless anyone has objections, I think we should just take this through
the qcom tree.
---
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c            |   6 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c            |   5 +-
 drivers/gpu/drm/msm/adreno/a8xx_gpu.c            |   2 -
 drivers/media/platform/qcom/iris/iris_firmware.c |  10 +-
 drivers/media/platform/qcom/venus/firmware.c     |   9 +-
 drivers/net/ipa/ipa_main.c                       |   5 +-
 drivers/remoteproc/qcom_q6v5_mss.c               |   4 +-
 drivers/remoteproc/qcom_q6v5_pas.c               | 144 +++++++++++------------
 drivers/remoteproc/qcom_wcnss.c                  |  11 +-
 include/linux/firmware/qcom/qcom_pas.h           |  27 +++++
 10 files changed, 119 insertions(+), 104 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index bec8219356df..0bc9aa3ead31 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -16,8 +16,6 @@
 extern bool hang_debug;
 static void a5xx_dump(struct msm_gpu *gpu);
 
-#define GPU_PAS_ID 13
-
 static void update_shadow_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
 {
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
@@ -679,7 +677,7 @@ static int a5xx_zap_shader_resume(struct msm_gpu *gpu)
 	if (adreno_is_a506(adreno_gpu))
 		return 0;
 
-	ret = qcom_pas_set_remote_state(SCM_GPU_ZAP_SHADER_RESUME, GPU_PAS_ID);
+	ret = qcom_pas_set_remote_state(SCM_GPU_ZAP_SHADER_RESUME, QCOM_PAS_ID_GPU);
 	if (ret)
 		DRM_ERROR("%s: zap-shader resume failed: %d\n",
 			gpu->name, ret);
@@ -699,7 +697,7 @@ static int a5xx_zap_shader_init(struct msm_gpu *gpu)
 	if (loaded)
 		return a5xx_zap_shader_resume(gpu);
 
-	ret = adreno_zap_shader_load(gpu, GPU_PAS_ID);
+	ret = adreno_zap_shader_load(gpu, QCOM_PAS_ID_GPU);
 
 	loaded = !ret;
 	return ret;
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 54b2acb56bf1..96ac622d0548 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -11,11 +11,10 @@
 
 #include <linux/bitfield.h>
 #include <linux/devfreq.h>
+#include <linux/firmware/qcom/qcom_pas.h>
 #include <linux/pm_domain.h>
 #include <linux/soc/qcom/llcc-qcom.h>
 
-#define GPU_PAS_ID 13
-
 static u64 a6xx_gmu_get_timestamp(struct msm_gpu *gpu)
 {
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
@@ -1134,7 +1133,7 @@ int a6xx_zap_shader_init(struct msm_gpu *gpu)
 	if (loaded)
 		return 0;
 
-	ret = adreno_zap_shader_load(gpu, GPU_PAS_ID);
+	ret = adreno_zap_shader_load(gpu, QCOM_PAS_ID_GPU);
 
 	loaded = !ret;
 	return ret;
diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
index a1747990e10e..2c23e7efe716 100644
--- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
@@ -14,8 +14,6 @@
 #include <linux/pm_domain.h>
 #include <linux/soc/qcom/llcc-qcom.h>
 
-#define GPU_PAS_ID 13
-
 static void a8xx_aperture_slice_set(struct msm_gpu *gpu, u32 val)
 {
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
diff --git a/drivers/media/platform/qcom/iris/iris_firmware.c b/drivers/media/platform/qcom/iris/iris_firmware.c
index 21f57d37da18..a029938eeae2 100644
--- a/drivers/media/platform/qcom/iris/iris_firmware.c
+++ b/drivers/media/platform/qcom/iris/iris_firmware.c
@@ -13,8 +13,6 @@
 #include "iris_core.h"
 #include "iris_firmware.h"
 
-#define IRIS_PAS_ID				9
-
 /* Detect Gen2 firmware by scanning the blob for:
  *   QC_IMAGE_VERSION_STRING=<version>
  * and then checking:
@@ -210,7 +208,7 @@ static int iris_load_fw_to_memory(struct iris_core *core)
 	memset(mem_virt, 0, res_size);
 
 	ret = qcom_mdt_load(dev, firmware, fw_name,
-			    IRIS_PAS_ID, mem_virt, mem_phys, res_size, NULL);
+			    QCOM_PAS_ID_VIDEO, mem_virt, mem_phys, res_size, NULL);
 
 	if (!ret)
 		iris_detect_firmware(core, fw_name, mem_virt, res_size, desc);
@@ -233,7 +231,7 @@ int iris_fw_load(struct iris_core *core)
 		return ret;
 	}
 
-	ret = qcom_pas_auth_and_reset(IRIS_PAS_ID);
+	ret = qcom_pas_auth_and_reset(QCOM_PAS_ID_VIDEO);
 	if (ret)  {
 		dev_err(core->dev, "auth and reset failed: %d\n", ret);
 		return ret;
@@ -247,7 +245,7 @@ int iris_fw_load(struct iris_core *core)
 						     cp_config->cp_nonpixel_size);
 		if (ret) {
 			dev_err(core->dev, "qcom_scm_mem_protect_video_var failed: %d\n", ret);
-			qcom_pas_shutdown(IRIS_PAS_ID);
+			qcom_pas_shutdown(QCOM_PAS_ID_VIDEO);
 			return ret;
 		}
 	}
@@ -257,7 +255,7 @@ int iris_fw_load(struct iris_core *core)
 
 int iris_fw_unload(struct iris_core *core)
 {
-	return qcom_pas_shutdown(IRIS_PAS_ID);
+	return qcom_pas_shutdown(QCOM_PAS_ID_VIDEO);
 }
 
 int iris_set_hw_state(struct iris_core *core, bool resume)
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index 3a38ff985822..393d38df6a87 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -21,7 +21,6 @@
 #include "firmware.h"
 #include "hfi_venus_io.h"
 
-#define VENUS_PAS_ID			9
 #define VENUS_FW_MEM_SIZE		(6 * SZ_1M)
 #define VENUS_FW_START_ADDR		0x0
 
@@ -125,7 +124,7 @@ static int venus_load_fw(struct venus_core *core, const char *fwname,
 	}
 
 	if (core->use_tz)
-		ret = qcom_mdt_load(dev, mdt, fwname, VENUS_PAS_ID,
+		ret = qcom_mdt_load(dev, mdt, fwname, QCOM_PAS_ID_VIDEO,
 				    mem_va, *mem_phys, *mem_size, NULL);
 	else
 		ret = qcom_mdt_load_no_init(dev, mdt, fwname, mem_va,
@@ -237,7 +236,7 @@ int venus_boot(struct venus_core *core)
 	core->fw.mem_phys = mem_phys;
 
 	if (core->use_tz)
-		ret = qcom_pas_auth_and_reset(VENUS_PAS_ID);
+		ret = qcom_pas_auth_and_reset(QCOM_PAS_ID_VIDEO);
 	else
 		ret = venus_boot_no_tz(core, mem_phys, mem_size);
 
@@ -260,7 +259,7 @@ int venus_boot(struct venus_core *core)
 						     res->cp_nonpixel_start,
 						     res->cp_nonpixel_size);
 		if (ret) {
-			qcom_pas_shutdown(VENUS_PAS_ID);
+			qcom_pas_shutdown(QCOM_PAS_ID_VIDEO);
 			dev_err(dev, "set virtual address ranges fail (%d)\n",
 				ret);
 			return ret;
@@ -275,7 +274,7 @@ int venus_shutdown(struct venus_core *core)
 	int ret;
 
 	if (core->use_tz)
-		ret = qcom_pas_shutdown(VENUS_PAS_ID);
+		ret = qcom_pas_shutdown(QCOM_PAS_ID_VIDEO);
 	else
 		ret = venus_shutdown_no_tz(core);
 
diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c
index 14ac2d2faf7c..a947af6f024b 100644
--- a/drivers/net/ipa/ipa_main.c
+++ b/drivers/net/ipa/ipa_main.c
@@ -69,7 +69,6 @@
 
 /* The name of the GSI firmware file relative to /lib/firmware */
 #define IPA_FW_PATH_DEFAULT	"ipa_fws.mdt"
-#define IPA_PAS_ID		15
 
 /* Shift of 19.2 MHz timestamp to achieve lower resolution timestamps */
 /* IPA v5.5+ does not specify Qtime timestamp config for DPL */
@@ -623,11 +622,11 @@ static int ipa_firmware_load(struct device *dev)
 		goto out_release_firmware;
 	}
 
-	ret = qcom_mdt_load(dev, fw, path, IPA_PAS_ID, virt, phys, size, NULL);
+	ret = qcom_mdt_load(dev, fw, path, QCOM_PAS_ID_IPA, virt, phys, size, NULL);
 	if (ret) {
 		dev_err(dev, "error %d loading \"%s\"\n", ret, path);
 	} else {
-		ret = qcom_pas_auth_and_reset(IPA_PAS_ID);
+		ret = qcom_pas_auth_and_reset(QCOM_PAS_ID_IPA);
 		if (ret)
 			dev_err(dev, "error %d authenticating \"%s\"\n", ret, path);
 	}
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index dd052a62b858..c1165a93072d 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -41,8 +41,6 @@
 
 #define MBA_LOG_SIZE			SZ_4K
 
-#define MPSS_PAS_ID			5
-
 /* RMB Status Register Values */
 #define RMB_PBL_SUCCESS			0x1
 
@@ -1485,7 +1483,7 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
 	}
 
 	if (qproc->need_pas_mem_setup) {
-		ret = qcom_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
+		ret = qcom_pas_mem_setup(QCOM_PAS_ID_MSS, qproc->mpss_phys, qproc->mpss_size);
 		if (ret) {
 			dev_err(qproc->dev,
 				"setting up mpss memory failed: %d\n", ret);
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index ff2483529d73..2c6cf7538b41 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1100,7 +1100,7 @@ static const struct tmd_name modem_tmd_name[] = {
 static const struct qcom_pas_data adsp_resource_init = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.ssr_name = "lpass",
 	.sysmon_name = "adsp",
@@ -1110,7 +1110,7 @@ static const struct qcom_pas_data adsp_resource_init = {
 static const struct qcom_pas_data sa8775p_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mbn",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.minidump_id = 5,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1127,7 +1127,7 @@ static const struct qcom_pas_data sa8775p_adsp_resource = {
 static const struct qcom_pas_data sdm670_adsp_resource_init = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"lcx",
@@ -1142,7 +1142,7 @@ static const struct qcom_pas_data sdm670_adsp_resource_init = {
 static const struct qcom_pas_data sdm845_adsp_resource_init = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.load_state = "adsp",
 	.ssr_name = "lpass",
@@ -1153,7 +1153,7 @@ static const struct qcom_pas_data sdm845_adsp_resource_init = {
 static const struct qcom_pas_data sm6350_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"lcx",
@@ -1169,7 +1169,7 @@ static const struct qcom_pas_data sm6350_adsp_resource = {
 static const struct qcom_pas_data sm6375_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.proxy_pd_names = (char*[]){
@@ -1184,7 +1184,7 @@ static const struct qcom_pas_data sm6375_mpss_resource = {
 static const struct qcom_pas_data sm8150_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1199,7 +1199,7 @@ static const struct qcom_pas_data sm8150_adsp_resource = {
 static const struct qcom_pas_data sm8250_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.minidump_id = 5,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1216,7 +1216,7 @@ static const struct qcom_pas_data sm8250_adsp_resource = {
 static const struct qcom_pas_data sm8350_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"lcx",
@@ -1232,7 +1232,7 @@ static const struct qcom_pas_data sm8350_adsp_resource = {
 static const struct qcom_pas_data msm8996_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
-	.pas_id = 1,
+	.pas_id = QCOM_PAS_ID_ADSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1246,7 +1246,7 @@ static const struct qcom_pas_data msm8996_adsp_resource = {
 static const struct qcom_pas_data cdsp_resource_init = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.ssr_name = "cdsp",
 	.sysmon_name = "cdsp",
@@ -1256,7 +1256,7 @@ static const struct qcom_pas_data cdsp_resource_init = {
 static const struct qcom_pas_data sa8775p_cdsp0_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp0.mbn",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1277,7 +1277,7 @@ static const struct qcom_pas_data sa8775p_cdsp0_resource = {
 static const struct qcom_pas_data sa8775p_cdsp1_resource = {
 	.crash_reason_smem = 633,
 	.firmware_name = "cdsp1.mbn",
-	.pas_id = 30,
+	.pas_id = QCOM_PAS_ID_CDSP1,
 	.minidump_id = 20,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1298,7 +1298,7 @@ static const struct qcom_pas_data sa8775p_cdsp1_resource = {
 static const struct qcom_pas_data sdm845_cdsp_resource_init = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.load_state = "cdsp",
 	.ssr_name = "cdsp",
@@ -1309,7 +1309,7 @@ static const struct qcom_pas_data sdm845_cdsp_resource_init = {
 static const struct qcom_pas_data sm6350_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1328,7 +1328,7 @@ static const struct qcom_pas_data sm6350_cdsp_resource = {
 static const struct qcom_pas_data sm8150_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1346,7 +1346,7 @@ static const struct qcom_pas_data sm8150_cdsp_resource = {
 static const struct qcom_pas_data sm8250_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1361,7 +1361,7 @@ static const struct qcom_pas_data sm8250_cdsp_resource = {
 static const struct qcom_pas_data sc8280xp_nsp0_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"nsp",
@@ -1375,7 +1375,7 @@ static const struct qcom_pas_data sc8280xp_nsp0_resource = {
 static const struct qcom_pas_data sc8280xp_nsp1_resource = {
 	.crash_reason_smem = 633,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 30,
+	.pas_id = QCOM_PAS_ID_CDSP1,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"nsp",
@@ -1390,10 +1390,10 @@ static const struct qcom_pas_data x1e80100_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
 	.dtb_firmware_name = "adsp_dtb.mdt",
-	.pas_id = 1,
-	.dtb_pas_id = 0x24,
-	.lite_pas_id = 0x1f,
-	.lite_dtb_pas_id = 0x29,
+	.pas_id = QCOM_PAS_ID_ADSP,
+	.dtb_pas_id = QCOM_PAS_ID_ADSP_DTB,
+	.lite_pas_id = QCOM_PAS_ID_ADSP_LITE,
+	.lite_dtb_pas_id = QCOM_PAS_ID_ADSP_LITE_DTB,
 	.minidump_id = 5,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1411,8 +1411,8 @@ static const struct qcom_pas_data x1e80100_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
 	.dtb_firmware_name = "cdsp_dtb.mdt",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1433,7 +1433,7 @@ static const struct qcom_pas_data x1e80100_cdsp_resource = {
 static const struct qcom_pas_data sm8350_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1450,7 +1450,7 @@ static const struct qcom_pas_data sm8350_cdsp_resource = {
 static const struct qcom_pas_data sa8775p_gpdsp0_resource = {
 	.crash_reason_smem = 640,
 	.firmware_name = "gpdsp0.mbn",
-	.pas_id = 39,
+	.pas_id = QCOM_PAS_ID_GPDSP0,
 	.minidump_id = 21,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1467,7 +1467,7 @@ static const struct qcom_pas_data sa8775p_gpdsp0_resource = {
 static const struct qcom_pas_data sa8775p_gpdsp1_resource = {
 	.crash_reason_smem = 641,
 	.firmware_name = "gpdsp1.mbn",
-	.pas_id = 40,
+	.pas_id = QCOM_PAS_ID_GPDSP1,
 	.minidump_id = 22,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1484,7 +1484,7 @@ static const struct qcom_pas_data sa8775p_gpdsp1_resource = {
 static const struct qcom_pas_data mpss_resource_init = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.proxy_pd_names = (char*[]){
@@ -1504,7 +1504,7 @@ static const struct qcom_pas_data mpss_resource_init = {
 static const struct qcom_pas_data sc8180x_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.auto_boot = false,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1519,7 +1519,7 @@ static const struct qcom_pas_data sc8180x_mpss_resource = {
 static const struct qcom_pas_data msm8996_slpi_resource_init = {
 	.crash_reason_smem = 424,
 	.firmware_name = "slpi.mdt",
-	.pas_id = 12,
+	.pas_id = QCOM_PAS_ID_SLPI,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"ssc_cx",
@@ -1533,7 +1533,7 @@ static const struct qcom_pas_data msm8996_slpi_resource_init = {
 static const struct qcom_pas_data sdm845_slpi_resource_init = {
 	.crash_reason_smem = 424,
 	.firmware_name = "slpi.mdt",
-	.pas_id = 12,
+	.pas_id = QCOM_PAS_ID_SLPI,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"lcx",
@@ -1549,7 +1549,7 @@ static const struct qcom_pas_data sdm845_slpi_resource_init = {
 static const struct qcom_pas_data wcss_resource_init = {
 	.crash_reason_smem = 421,
 	.firmware_name = "wcnss.mdt",
-	.pas_id = 6,
+	.pas_id = QCOM_PAS_ID_WCSS,
 	.auto_boot = true,
 	.ssr_name = "mpss",
 	.sysmon_name = "wcnss",
@@ -1559,7 +1559,7 @@ static const struct qcom_pas_data wcss_resource_init = {
 static const struct qcom_pas_data sdx55_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
 		"cx",
@@ -1575,8 +1575,8 @@ static const struct qcom_pas_data milos_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mbn",
 	.dtb_firmware_name = "cdsp_dtb.mbn",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1595,8 +1595,8 @@ static const struct qcom_pas_data nord_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mbn",
 	.dtb_firmware_name = "adsp_dtb.mbn",
-	.pas_id = 1,
-	.dtb_pas_id = 36,
+	.pas_id = QCOM_PAS_ID_ADSP,
+	.dtb_pas_id = QCOM_PAS_ID_ADSP_DTB,
 	.minidump_id = 5,
 	.auto_boot = true,
 	.early_boot = true,
@@ -1616,8 +1616,8 @@ static const struct qcom_pas_data nord_cdsp0_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mbn",
 	.dtb_firmware_name = "cdsp_dtb.mbn",
-	.pas_id = 18,
-	.dtb_pas_id = 37,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1637,8 +1637,8 @@ static const struct qcom_pas_data nord_cdsp1_resource = {
 	.crash_reason_smem = 633,
 	.firmware_name = "cdsp1.mbn",
 	.dtb_firmware_name = "cdsp1_dtb.mbn",
-	.pas_id = 30,
-	.dtb_pas_id = 59,
+	.pas_id = QCOM_PAS_ID_CDSP1,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP1_DTB,
 	.minidump_id = 20,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1658,8 +1658,8 @@ static const struct qcom_pas_data nord_cdsp2_resource = {
 	.crash_reason_smem = 665,
 	.firmware_name = "cdsp2.mbn",
 	.dtb_firmware_name = "cdsp2_dtb.mbn",
-	.pas_id = 57,
-	.dtb_pas_id = 60,
+	.pas_id = QCOM_PAS_ID_CDSP2,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP2_DTB,
 	.minidump_id = 29,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1679,8 +1679,8 @@ static const struct qcom_pas_data nord_cdsp3_resource = {
 	.crash_reason_smem = 666,
 	.firmware_name = "cdsp3.mbn",
 	.dtb_firmware_name = "cdsp3_dtb.mbn",
-	.pas_id = 58,
-	.dtb_pas_id = 61,
+	.pas_id = QCOM_PAS_ID_CDSP3,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP3_DTB,
 	.minidump_id = 30,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1699,7 +1699,7 @@ static const struct qcom_pas_data nord_cdsp3_resource = {
 static const struct qcom_pas_data sm8450_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.decrypt_shutdown = true,
@@ -1718,8 +1718,8 @@ static const struct qcom_pas_data sm8550_adsp_resource = {
 	.crash_reason_smem = 423,
 	.firmware_name = "adsp.mdt",
 	.dtb_firmware_name = "adsp_dtb.mdt",
-	.pas_id = 1,
-	.dtb_pas_id = 0x24,
+	.pas_id = QCOM_PAS_ID_ADSP,
+	.dtb_pas_id = QCOM_PAS_ID_ADSP_DTB,
 	.minidump_id = 5,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1738,8 +1738,8 @@ static const struct qcom_pas_data sm8550_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
 	.dtb_firmware_name = "cdsp_dtb.mdt",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1759,8 +1759,8 @@ static const struct qcom_pas_data sm8550_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
 	.dtb_firmware_name = "modem_dtb.mdt",
-	.pas_id = 4,
-	.dtb_pas_id = 0x26,
+	.pas_id = QCOM_PAS_ID_MPSS,
+	.dtb_pas_id = QCOM_PAS_ID_MPSS_DTB,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.decrypt_shutdown = true,
@@ -1782,7 +1782,7 @@ static const struct qcom_pas_data sm8550_mpss_resource = {
 static const struct qcom_pas_data sc7280_wpss_resource = {
 	.crash_reason_smem = 626,
 	.firmware_name = "wpss.mdt",
-	.pas_id = 6,
+	.pas_id = QCOM_PAS_ID_WCSS,
 	.minidump_id = 4,
 	.auto_boot = false,
 	.proxy_pd_names = (char*[]){
@@ -1799,7 +1799,7 @@ static const struct qcom_pas_data sc7280_wpss_resource = {
 static const struct qcom_pas_data shikra_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mbn",
-	.pas_id = 18,
+	.pas_id = QCOM_PAS_ID_CDSP,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char *[]){
@@ -1820,8 +1820,8 @@ static const struct qcom_pas_data shikra_lpaicp_resource = {
 	.crash_reason_smem = 682,
 	.firmware_name = "lpaicp.mbn",
 	.dtb_firmware_name = "lpaicp_dtb.mbn",
-	.pas_id = 0x56,
-	.dtb_pas_id = 0x57,
+	.pas_id = QCOM_PAS_ID_LPAICP,
+	.dtb_pas_id = QCOM_PAS_ID_LPAICP_DTB,
 	.minidump_id = 0,
 	.auto_boot = true,
 	.ssr_name = "lpaicp",
@@ -1831,7 +1831,7 @@ static const struct qcom_pas_data shikra_lpaicp_resource = {
 static const struct qcom_pas_data shikra_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "qdsp6sw.mbn",
-	.pas_id = 4,
+	.pas_id = QCOM_PAS_ID_MPSS,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.proxy_pd_names = (char *[]){
@@ -1851,8 +1851,8 @@ static const struct qcom_pas_data sm8650_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
 	.dtb_firmware_name = "cdsp_dtb.mdt",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1876,8 +1876,8 @@ static const struct qcom_pas_data sm8650_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
 	.dtb_firmware_name = "modem_dtb.mdt",
-	.pas_id = 4,
-	.dtb_pas_id = 0x26,
+	.pas_id = QCOM_PAS_ID_MPSS,
+	.dtb_pas_id = QCOM_PAS_ID_MPSS_DTB,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.decrypt_shutdown = true,
@@ -1900,8 +1900,8 @@ static const struct qcom_pas_data sm8750_mpss_resource = {
 	.crash_reason_smem = 421,
 	.firmware_name = "modem.mdt",
 	.dtb_firmware_name = "modem_dtb.mdt",
-	.pas_id = 4,
-	.dtb_pas_id = 0x26,
+	.pas_id = QCOM_PAS_ID_MPSS,
+	.dtb_pas_id = QCOM_PAS_ID_MPSS_DTB,
 	.minidump_id = 3,
 	.auto_boot = false,
 	.decrypt_shutdown = true,
@@ -1924,8 +1924,8 @@ static const struct qcom_pas_data kaanapali_soccp_resource = {
 	.crash_reason_smem = 656,
 	.firmware_name = "soccp.mbn",
 	.dtb_firmware_name = "soccp_dtb.mbn",
-	.pas_id = 51,
-	.dtb_pas_id = 0x41,
+	.pas_id = QCOM_PAS_ID_SOCCP,
+	.dtb_pas_id = QCOM_PAS_ID_SOCCP_DTB,
 	.proxy_pd_names = (char*[]){
 		"cx",
 		"mx",
@@ -1941,8 +1941,8 @@ static const struct qcom_pas_data glymur_soccp_resource = {
 	.crash_reason_smem = 656,
 	.firmware_name = "soccp.mbn",
 	.dtb_firmware_name = "soccp_dtb.mbn",
-	.pas_id = 51,
-	.dtb_pas_id = 0x41,
+	.pas_id = QCOM_PAS_ID_SOCCP,
+	.dtb_pas_id = QCOM_PAS_ID_SOCCP_DTB,
 	.proxy_pd_names = (char*[]){
 		"cx",
 		"mx",
@@ -1959,8 +1959,8 @@ static const struct qcom_pas_data hawi_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mdt",
 	.dtb_firmware_name = "cdsp_dtb.mdt",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
@@ -1986,8 +1986,8 @@ static const struct qcom_pas_data eliza_cdsp_resource = {
 	.crash_reason_smem = 601,
 	.firmware_name = "cdsp.mbn",
 	.dtb_firmware_name = "cdsp_dtb.mbn",
-	.pas_id = 18,
-	.dtb_pas_id = 0x25,
+	.pas_id = QCOM_PAS_ID_CDSP,
+	.dtb_pas_id = QCOM_PAS_ID_CDSP_DTB,
 	.minidump_id = 7,
 	.auto_boot = true,
 	.proxy_pd_names = (char*[]){
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 02f38fe29f20..b712faf93830 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -33,7 +33,6 @@
 
 #define WCNSS_CRASH_REASON_SMEM		422
 #define WCNSS_FIRMWARE_NAME		"wcnss.mdt"
-#define WCNSS_PAS_ID			6
 #define WCNSS_SSCTL_ID			0x13
 
 #define WCNSS_SPARE_NVBIN_DLND		BIT(25)
@@ -157,7 +156,7 @@ static int wcnss_load(struct rproc *rproc, const struct firmware *fw)
 	struct qcom_wcnss *wcnss = rproc->priv;
 	int ret;
 
-	ret = qcom_mdt_load(wcnss->dev, fw, rproc->firmware, WCNSS_PAS_ID,
+	ret = qcom_mdt_load(wcnss->dev, fw, rproc->firmware, QCOM_PAS_ID_WCSS,
 			    (__force void *)wcnss->mem_region, wcnss->mem_phys,
 			    wcnss->mem_size, &wcnss->mem_reloc);
 	if (ret)
@@ -257,7 +256,7 @@ static int wcnss_start(struct rproc *rproc)
 	wcnss_indicate_nv_download(wcnss);
 	wcnss_configure_iris(wcnss);
 
-	ret = qcom_pas_auth_and_reset(WCNSS_PAS_ID);
+	ret = qcom_pas_auth_and_reset(QCOM_PAS_ID_WCSS);
 	if (ret) {
 		dev_err(wcnss->dev,
 			"failed to authenticate image and release reset\n");
@@ -269,7 +268,7 @@ static int wcnss_start(struct rproc *rproc)
 	if (wcnss->ready_irq > 0 && ret == 0) {
 		/* We have a ready_irq, but it didn't fire in time. */
 		dev_err(wcnss->dev, "start timed out\n");
-		qcom_pas_shutdown(WCNSS_PAS_ID);
+		qcom_pas_shutdown(QCOM_PAS_ID_WCSS);
 		ret = -ETIMEDOUT;
 		goto disable_iris;
 	}
@@ -311,7 +310,7 @@ static int wcnss_stop(struct rproc *rproc)
 					    0);
 	}
 
-	ret = qcom_pas_shutdown(WCNSS_PAS_ID);
+	ret = qcom_pas_shutdown(QCOM_PAS_ID_WCSS);
 	if (ret)
 		dev_err(wcnss->dev, "failed to shutdown: %d\n", ret);
 
@@ -563,7 +562,7 @@ static int wcnss_probe(struct platform_device *pdev)
 	if (!qcom_pas_is_available())
 		return -EPROBE_DEFER;
 
-	if (!qcom_pas_supported(WCNSS_PAS_ID)) {
+	if (!qcom_pas_supported(QCOM_PAS_ID_WCSS)) {
 		dev_err(&pdev->dev, "PAS is not available for WCNSS\n");
 		return -ENXIO;
 	}
diff --git a/include/linux/firmware/qcom/qcom_pas.h b/include/linux/firmware/qcom/qcom_pas.h
index 1d132e89536e..3329e362835a 100644
--- a/include/linux/firmware/qcom/qcom_pas.h
+++ b/include/linux/firmware/qcom/qcom_pas.h
@@ -13,6 +13,33 @@
 #include <linux/io.h>
 #include <linux/types.h>
 
+#define QCOM_PAS_ID_ADSP		1
+#define QCOM_PAS_ID_MPSS		4
+#define QCOM_PAS_ID_MSS			5
+#define QCOM_PAS_ID_WCSS		6
+#define QCOM_PAS_ID_VIDEO		9
+#define QCOM_PAS_ID_SLPI		12
+#define QCOM_PAS_ID_GPU			13
+#define QCOM_PAS_ID_IPA			15
+#define QCOM_PAS_ID_CDSP		18
+#define QCOM_PAS_ID_CDSP1		30
+#define QCOM_PAS_ID_ADSP_LITE		31
+#define QCOM_PAS_ID_ADSP_DTB		36
+#define QCOM_PAS_ID_CDSP_DTB		37
+#define QCOM_PAS_ID_MPSS_DTB		38
+#define QCOM_PAS_ID_GPDSP0		39
+#define QCOM_PAS_ID_GPDSP1		40
+#define QCOM_PAS_ID_ADSP_LITE_DTB	41
+#define QCOM_PAS_ID_SOCCP		51
+#define QCOM_PAS_ID_CDSP2		57
+#define QCOM_PAS_ID_CDSP3		58
+#define QCOM_PAS_ID_CDSP1_DTB		59
+#define QCOM_PAS_ID_CDSP2_DTB		60
+#define QCOM_PAS_ID_CDSP3_DTB		61
+#define QCOM_PAS_ID_SOCCP_DTB		65
+#define QCOM_PAS_ID_LPAICP		86
+#define QCOM_PAS_ID_LPAICP_DTB		87
+
 struct qcom_pas_context {
 	struct device *dev;
 	u32 pas_id;

---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261202-topic-pas_id-71fa3c61df68

Best regards,
--  
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


                 reply	other threads:[~2026-12-02 10:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202-topic-pas_id-v1-1-23fc20faa6dc@oss.qualcomm.com \
    --to=konradybcio@kernel.org \
    --cc=abelvesa@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bod@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edumazet@kernel.org \
    --cc=elder@kernel.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox