Przeglądaj źródła

dataipa: update uC request/response cmd opcode size and IPA EP's

1) Extend uC request/response opcode datatype from u8 to u16.
2) Update EP's according to IPA TZ EP's mapping.
3) Adding a missing checks for XR platform type.

Change-Id: I34064d594a5c7a38da23c74b3763eded608815c8
Signed-off-by: Prasad Arepalli <[email protected]>
Prasad Arepalli 1 rok temu
rodzic
commit
3a20b8394b

+ 1 - 1
drivers/platform/msm/ipa/ipa_clients/ipa_wdi3.c

@@ -58,7 +58,7 @@
 /**
  * No. of filters reserving at wlan for IPA-XR usecase.
  */
-#define NO_OF_FILTERS		4
+#define NO_OF_FILTERS		2
 
 static void ipa_xr_wdi_opt_dpath_rsrv_filter_wq_handler(struct work_struct *work);
 static struct workqueue_struct *wlan_flt_rsrv_wq = NULL;

+ 2 - 1
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -7556,7 +7556,8 @@ static void ipa3_freeze_clock_vote_and_notify_modem(void)
 	int res;
 	struct ipa_active_client_logging_info log_info;
 
-	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ) {
+	if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ ||
+		ipa3_ctx->platform_type == IPA_PLAT_TYPE_XR) {
 		IPADBG("Ignore smp2p on APQ platform\n");
 		return;
 	}

+ 9 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_uc.c

@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "ipa_i.h"
@@ -159,9 +160,17 @@ struct IpaHwRegWriteCmdData_t {
  */
 union IpaHwCpuCmdCompletedResponseData_t {
 	struct IpaHwCpuCmdCompletedResponseParams_t {
+	#ifdef CONFIG_IPA_RTP
+		u32 originalCmdOp:16;
+	#else
 		u32 originalCmdOp:8;
+	#endif
 		u32 status:8;
+	#ifdef CONFIG_IPA_RTP
+		u32 responseData:8;
+	#else
 		u32 responseData:16;
+	#endif
 	} __packed params;
 	u32 raw32b;
 } __packed;

+ 4 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_uc_offload_i.h

@@ -187,8 +187,12 @@ enum ipa3_hw_errors {
  * The shared memory is used for communication between IPA HW and CPU.
  */
 struct IpaHwSharedMemCommonMapping_t {
+#ifdef CONFIG_IPA_RTP
+	u16  cmdOp;
+#else
 	u8  cmdOp;
 	u8  reserved_01;
+#endif
 	u16 reserved_03_02;
 	u32 cmdParams;
 	u32 cmdParams_hi;

+ 2 - 2
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -5785,7 +5785,7 @@ static const struct ipa_ep_configuration ipa3_ep_mapping
 			false,
 			IPA_DPS_HPS_SEQ_TYPE_DMA_ONLY,
 			QMB_MASTER_SELECT_DDR,
-			{ 14, 12, 20, 24, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY, 0},
+			{ 14, 11, 20, 24, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY, 0},
 			IPA_TX_INSTANCE_NA },
 	[IPA_5_5_XR][IPA_CLIENT_WLAN2_PROD] = {
 			true, IPA_v5_5_GROUP_UL,
@@ -5800,7 +5800,7 @@ static const struct ipa_ep_configuration ipa3_ep_mapping
 			false,
 			IPA_DPS_HPS_SEQ_TYPE_INVALID,
 			QMB_MASTER_SELECT_DDR,
-			{ 17, 14, 9, 9, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY, 0},
+			{ 17, 13, 9, 9, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY, 0},
 			IPA_TX_INSTANCE_UL },
 
 	[IPA_5_5_XR][IPA_CLIENT_WLAN2_CONS] = {

+ 7 - 4
drivers/platform/msm/ipa/ipa_v3/ipa_wdi3_i.c

@@ -2,7 +2,7 @@
 /*
  * Copyright (c) 2018 - 2021, The Linux Foundation. All rights reserved.
  *
- * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include "ipa_i.h"
@@ -1043,7 +1043,8 @@ int ipa3_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx,
 	else
 		ipa3_release_wdi3_gsi_smmu_mappings(IPA_WDI3_RX2_DIR);
 
-	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2)
+	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2
+		&& ipa3_ctx->platform_type != IPA_PLAT_TYPE_XR)
 		ipa3_uc_debug_stats_dealloc(IPA_HW_PROTOCOL_WDI3);
 
 	if (ipa3_ctx->ipa_wdi_opt_dpath)
@@ -1163,7 +1164,8 @@ int ipa3_enable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx,
 		goto fail_start_channel3;
 	}
 	/* start uC gsi dbg stats monitor */
-	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2) {
+	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2
+		&& ipa3_ctx->platform_type != IPA_PLAT_TYPE_XR) {
 		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].ch_id
 			= ep_rx->gsi_chan_hdl;
 		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].dir
@@ -1308,7 +1310,8 @@ int ipa3_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx,
 		}
 	}
 	/* stop uC gsi dbg stats monitor */
-	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2) {
+	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && ipa3_ctx->ipa_hw_type != IPA_HW_v5_2
+		&& ipa3_ctx->platform_type != IPA_PLAT_TYPE_XR) {
 		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].ch_id
 			= 0xff;
 		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].dir