瀏覽代碼

Enable IPA and GSI driver compilation on techapck

Update makefile to enable IPA and GSI driver
compilations. Add ipa_clients_manager that will register
ipa clients API to ipa_framework at the kernel.
Add conf and header files to enable compilation in
GKI QGKI and debug modes.

Change-Id: I6993b1f6e88f89c8cd8c02fa2fc8cf6a6f169f7d
Signed-off-by: Ghanim Fodi <[email protected]>
Signed-off-by: Amir Levy <[email protected]>
Amir Levy 5 年之前
父節點
當前提交
73c931c92c

+ 1 - 2
Makefile

@@ -1,4 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-n += drivers/platform/msm/
-#obj-$(CONFIG_ARCH_QCOM) += drivers/platform/msm
+obj-$(CONFIG_ARCH_QCOM) += drivers/platform/msm/

+ 10 - 0
config/lahainadataipa.h

@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+* Copyright (c) 2020, The Linux Foundation. All rights reserved.
+*/
+
+#define CONFIG_GSI 1
+#define CONFIG_GSI_REGISTER_VERSION_2 1
+#define CONFIG_RMNET_IPA3 1
+#define CONFIG_RNDIS_IPA 1
+#define CONFIG_IPA_WDI_UNIFIED_API 1

+ 6 - 0
config/lahainadataipa_GKI.conf

@@ -0,0 +1,6 @@
+export CONFIG_GSI=m
+export CONFIG_GSI_REGISTER_VERSION_2=y
+export CONFIG_IPA_CLIENTS_MANAGER=m
+export CONFIG_IPA_WDI_UNIFIED_API=y
+export CONFIG_RMNET_IPA3=y
+export CONFIG_RNDIS_IPA=m

+ 6 - 0
config/lahainadataipa_QGKI.conf

@@ -0,0 +1,6 @@
+export CONFIG_GSI=y
+export CONFIG_GSI_REGISTER_VERSION_2=y
+export CONFIG_IPA_CLIENTS_MANAGER=y
+export CONFIG_IPA_WDI_UNIFIED_API=y
+export CONFIG_RMNET_IPA3=y
+export CONFIG_RNDIS_IPA=y

+ 2 - 0
config/lahainadataipa_debug.conf

@@ -0,0 +1,2 @@
+export CONFIG_IPA_DEBUG=y
+export CONFIG_IPA_UT=y

+ 7 - 0
config/lahainadataipa_debug.h

@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+* Copyright (c) 2020, The Linux Foundation. All rights reserved.
+*/
+
+#define CONFIG_IPA_DEBUG 1
+#define CONFIG_IPA_UT 1

+ 13 - 0
drivers/platform/msm/Makefile

@@ -1,4 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
+ifeq ($(CONFIG_ARCH_LAHAINA), y)
+LINUXINCLUDE    += -include $(srctree)/techpack/dataipa/config/lahainadataipa.h
+ifeq ($(CONFIG_QGKI),y)
+include $(srctree)/techpack/dataipa/config/lahainadataipa_QGKI.conf
+ifeq ($(CONFIG_DEBUG_KERNEL), y)
+include $(srctree)/techpack/dataipa/config/lahainadataipa_debug.conf
+LINUXINCLUDE    += -include $(srctree)/techpack/dataipa/config/lahainadataipa_debug.h
+endif
+else
+include $(srctree)/techpack/dataipa/config/lahainadataipa_GKI.conf
+endif
+endif
+
 obj-$(CONFIG_GSI) += gsi/
 obj-$(CONFIG_IPA3) += ipa/

+ 8 - 50
drivers/platform/msm/ipa/ipa_api.c

@@ -1719,44 +1719,6 @@ int ipa_set_single_ndp_per_mbim(bool enable)
 }
 EXPORT_SYMBOL(ipa_set_single_ndp_per_mbim);
 
-/**
- * ipa_tx_dp() - Data-path tx handler
- * @dst:	[in] which IPA destination to route tx packets to
- * @skb:	[in] the packet to send
- * @metadata:	[in] TX packet meta-data
- *
- * Data-path tx handler, this is used for both SW data-path which by-passes most
- * IPA HW blocks AND the regular HW data-path for WLAN AMPDU traffic only. If
- * dst is a "valid" CONS type, then SW data-path is used. If dst is the
- * WLAN_AMPDU PROD type, then HW data-path for WLAN AMPDU is used. Anything else
- * is an error. For errors, client needs to free the skb as needed. For success,
- * IPA driver will later invoke client callback if one was supplied. That
- * callback should free the skb. If no callback supplied, IPA driver will free
- * the skb internally
- *
- * The function will use two descriptors for this send command
- * (for A5_WLAN_AMPDU_PROD only one desciprtor will be sent),
- * the first descriptor will be used to inform the IPA hardware that
- * apps need to push data into the IPA (IP_PACKET_INIT immediate command).
- * Once this send was done from SPS point-of-view the IPA driver will
- * get notified by the supplied callback - ipa_sps_irq_tx_comp()
- *
- * ipa_sps_irq_tx_comp will call to the user supplied
- * callback (from ipa_connect)
- *
- * Returns:	0 on success, negative on failure
- */
-int ipa_tx_dp(enum ipa_client_type dst, struct sk_buff *skb,
-		struct ipa_tx_meta *meta)
-{
-	int ret;
-
-	IPA_API_DISPATCH_RETURN(ipa_tx_dp, dst, skb, meta);
-
-	return ret;
-}
-EXPORT_SYMBOL(ipa_tx_dp);
-
 /**
  * ipa_tx_dp_mul() - Data-path tx handler for multiple packets
  * @src: [in] - Client that is sending data
@@ -3232,18 +3194,6 @@ static int ipa_ap_resume(struct device *dev)
 	return ret;
 }
 
-int ipa_register_ipa_ready_cb(void (*ipa_ready_cb)(void *user_data),
-			      void *user_data)
-{
-	int ret;
-
-	IPA_API_DISPATCH_RETURN(ipa_register_ipa_ready_cb,
-				ipa_ready_cb, user_data);
-
-	return ret;
-}
-EXPORT_SYMBOL(ipa_register_ipa_ready_cb);
-
 /**
  * ipa_inc_client_enable_clks() - Increase active clients counter, and
  * enable ipa clocks if necessary
@@ -3831,6 +3781,12 @@ static int __init ipa_module_init(void)
 {
 	pr_debug("IPA module init\n");
 
+	ipa3_ctx = kzalloc(sizeof(*ipa3_ctx), GFP_KERNEL);
+	if (!ipa3_ctx) {
+		return -ENOMEM;
+	}
+	mutex_init(&ipa3_ctx->lock);
+
 	if (running_emulation) {
 		/* Register as a PCI device driver */
 		return pci_register_driver(&ipa_pci_driver);
@@ -3845,6 +3801,8 @@ static void __exit ipa_module_exit(void)
 	if (running_emulation)
 		pci_unregister_driver(&ipa_pci_driver);
 	platform_driver_unregister(&ipa_plat_drv);
+	kfree(ipa3_ctx);
+	ipa3_ctx = NULL;
 }
 module_exit(ipa_module_exit);
 

+ 0 - 6
drivers/platform/msm/ipa/ipa_api.h

@@ -175,9 +175,6 @@ struct ipa_api_controller {
 
 	int (*ipa_set_single_ndp_per_mbim)(bool enable);
 
-	int (*ipa_tx_dp)(enum ipa_client_type dst, struct sk_buff *skb,
-		struct ipa_tx_meta *metadata);
-
 	int (*ipa_tx_dp_mul)(enum ipa_client_type dst,
 			struct ipa_tx_data_desc *data_desc);
 
@@ -372,9 +369,6 @@ struct ipa_api_controller {
 	const struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info)
 		(enum ipa_client_type client);
 
-	int (*ipa_register_ipa_ready_cb)(void (*ipa_ready_cb)(void *user_data),
-		void *user_data);
-
 	void (*ipa_inc_client_enable_clks)(
 		struct ipa_active_client_logging_info *id);
 

+ 3 - 3
drivers/platform/msm/ipa/ipa_clients/Makefile

@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-$(CONFIG_IPA_USB) += ipausbm.o
-ipausbm-objs := ipa_usb.o
-
 obj-$(CONFIG_RNDIS_IPA) += rndisipam.o
 rndisipam-objs := rndis_ipa.o
 
 obj-$(CONFIG_ECM_IPA) += ecmipam.o
 ecmipam-objs := ecm_ipa.o
+
+obj-$(CONFIG_IPA_CLIENTS_MANAGER) += ipa_clientsm.o
+ipa_clientsm-objs := ipa_clients_manager.o ipa_usb.o

+ 12 - 0
drivers/platform/msm/ipa/ipa_clients/ipa_clients_i.h

@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+* Copyright (c) 2020, The Linux Foundation. All rights reserved.
+*/
+
+#if !defined(_IPA_CLIENTS_I_H)
+#define _IPA_CLIENTS_I_H
+
+int ipa3_usb_init(void);
+void ipa3_usb_exit(void);
+
+#endif /* _IPA_CLIENTS_I_H */

+ 34 - 0
drivers/platform/msm/ipa/ipa_clients/ipa_clients_manager.c

@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include "ipa_clients_i.h"
+#include "../ipa_v3/ipa_i.h"
+
+static int __init ipa_clients_manager_init(void)
+{
+	pr_info("IPA clients manager init\n");
+
+	ipa3_usb_init();
+
+	ipa3_notify_clients_registered();
+
+	return 0;
+}
+subsys_initcall(ipa_clients_manager_init);
+
+static void __exit ipa_clients_manager_exit(void)
+{
+	pr_debug("IPA clients manger exit\n");
+
+	ipa3_usb_exit();
+}
+module_exit(ipa_clients_manager_exit);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("IPA HW clients manager");

+ 21 - 20
drivers/platform/msm/ipa/ipa_clients/ipa_usb.c

@@ -11,6 +11,7 @@
 #include <linux/ipa_usb.h>
 #include <linux/rndis_ipa.h>
 #include <linux/ecm_ipa.h>
+#include <linux/ipa_fmwk.h>
 #include "../ipa_v3/ipa_i.h"
 #include "../ipa_rm_i.h"
 
@@ -732,7 +733,7 @@ static int ipa_usb_set_lock_unlock(bool is_lock)
 	return 0;
 }
 
-int ipa_usb_init_teth_prot(enum ipa_usb_teth_prot teth_prot,
+static int ipa_usb_init_teth_prot_api(enum ipa_usb_teth_prot teth_prot,
 			   struct ipa_usb_teth_params *teth_params,
 			   int (*ipa_usb_notify_cb)(enum ipa_usb_notify_event,
 			   void *),
@@ -906,7 +907,6 @@ bad_params:
 	mutex_unlock(&ipa3_usb_ctx->general_mutex);
 	return result;
 }
-EXPORT_SYMBOL(ipa_usb_init_teth_prot);
 
 static void ipa3_usb_gsi_evt_err_cb(struct gsi_evt_err_notify *notify)
 {
@@ -1828,7 +1828,7 @@ static void ipa_usb_debugfs_init(void){}
 static void ipa_usb_debugfs_remove(void){}
 #endif /* CONFIG_DEBUG_FS */
 
-int ipa_usb_xdci_connect(struct ipa_usb_xdci_chan_params *ul_chan_params,
+static int ipa_usb_xdci_connect_api(struct ipa_usb_xdci_chan_params *ul_chan_params,
 			 struct ipa_usb_xdci_chan_params *dl_chan_params,
 			 struct ipa_req_chan_out_params *ul_out_params,
 			 struct ipa_req_chan_out_params *dl_out_params,
@@ -1910,7 +1910,6 @@ bad_params:
 	mutex_unlock(&ipa3_usb_ctx->general_mutex);
 	return result;
 }
-EXPORT_SYMBOL(ipa_usb_xdci_connect);
 
 static int ipa3_usb_check_disconnect_prot(enum ipa_usb_teth_prot teth_prot)
 {
@@ -1996,7 +1995,7 @@ static int ipa_usb_xdci_dismiss_channels(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
 	return 0;
 }
 
-int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+static int ipa_usb_xdci_disconnect_api(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
 			    enum ipa_usb_teth_prot teth_prot)
 {
 	int result = 0;
@@ -2106,9 +2105,8 @@ bad_params:
 	return result;
 
 }
-EXPORT_SYMBOL(ipa_usb_xdci_disconnect);
 
-int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot)
+static int ipa_usb_deinit_teth_prot_api(enum ipa_usb_teth_prot teth_prot)
 {
 	int result = -EFAULT;
 	enum ipa3_usb_transport_type ttype;
@@ -2209,7 +2207,6 @@ bad_params:
 	mutex_unlock(&ipa3_usb_ctx->general_mutex);
 	return result;
 }
-EXPORT_SYMBOL(ipa_usb_deinit_teth_prot);
 
 /* Assumes lock already acquired */
 static int ipa3_usb_suspend_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
@@ -2295,7 +2292,7 @@ fail_exit:
 	return result;
 }
 
-int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+static int ipa_usb_xdci_suspend_api(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
 	enum ipa_usb_teth_prot teth_prot, bool with_remote_wakeup)
 {
 	int result = 0;
@@ -2374,7 +2371,6 @@ bad_params:
 	mutex_unlock(&ipa3_usb_ctx->general_mutex);
 	return result;
 }
-EXPORT_SYMBOL(ipa_usb_xdci_suspend);
 
 /* Assumes lock already acquired */
 static int ipa3_usb_resume_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
@@ -2454,7 +2450,7 @@ fail_exit:
 	return result;
 }
 
-int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+static int ipa_usb_xdci_resume_api(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
 	enum ipa_usb_teth_prot teth_prot)
 {
 	int result = -EFAULT;
@@ -2555,16 +2551,17 @@ bad_params:
 	mutex_unlock(&ipa3_usb_ctx->general_mutex);
 	return result;
 }
-EXPORT_SYMBOL(ipa_usb_xdci_resume);
 
-static int __init ipa3_usb_init(void)
+int ipa3_usb_init(void)
 {
 	int i;
 	unsigned long flags;
 	int res;
 	struct ipa3_usb_pm_context *pm_ctx;
+	struct ipa_usb_data funcs;
 
 	pr_info("ipa_usb driver init\n");
+
 	ipa3_usb_ctx = kzalloc(sizeof(struct ipa3_usb_context), GFP_KERNEL);
 	if (ipa3_usb_ctx == NULL) {
 		pr_err(":ipa_usb init failed\n");
@@ -2608,6 +2605,16 @@ static int __init ipa3_usb_init(void)
 
 	ipa_usb_debugfs_init();
 
+	funcs.ipa_usb_init_teth_prot = ipa_usb_init_teth_prot_api;
+	funcs.ipa_usb_xdci_connect = ipa_usb_xdci_connect_api;
+	funcs.ipa_usb_xdci_disconnect = ipa_usb_xdci_disconnect_api;
+	funcs.ipa_usb_deinit_teth_prot = ipa_usb_deinit_teth_prot_api;
+	funcs.ipa_usb_xdci_suspend = ipa_usb_xdci_suspend_api;
+	funcs.ipa_usb_xdci_resume = ipa_usb_xdci_resume_api;
+	if (ipa_fmwk_register_ipa_usb(&funcs)) {
+		pr_err("failed to register ipa_usb APIs\n");
+	}
+
 	pr_info("exit: IPA_USB init success!\n");
 
 	return 0;
@@ -2618,7 +2625,7 @@ ipa_usb_workqueue_fail:
 	return res;
 }
 
-static void ipa3_usb_exit(void)
+void ipa3_usb_exit(void)
 {
 	IPA_USB_DBG_LOW("IPA_USB exit\n");
 
@@ -2633,9 +2640,3 @@ static void ipa3_usb_exit(void)
 	ipa_usb_debugfs_remove();
 	kfree(ipa3_usb_ctx);
 }
-
-arch_initcall(ipa3_usb_init);
-module_exit(ipa3_usb_exit);
-
-MODULE_LICENSE("GPL v2");
-MODULE_DESCRIPTION("IPA USB client driver");

+ 36 - 51
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -141,7 +141,7 @@ static struct ipa3_plat_drv_res ipa3_res = {0, };
 
 static struct clk *ipa3_clk;
 
-struct ipa3_context *ipa3_ctx;
+struct ipa3_context *ipa3_ctx = NULL;
 
 static struct {
 	bool present[IPA_SMMU_CB_MAX];
@@ -5656,20 +5656,6 @@ static void ipa3_register_panic_hdlr(void)
 		&ipa3_panic_blk);
 }
 
-static void ipa3_trigger_ipa_ready_cbs(void)
-{
-	struct ipa3_ready_cb_info *info;
-
-	mutex_lock(&ipa3_ctx->lock);
-
-	/* Call all the CBs */
-	list_for_each_entry(info, &ipa3_ctx->ipa_ready_cb_list, link)
-		if (info->ready_cb)
-			info->ready_cb(info->user_data);
-
-	mutex_unlock(&ipa3_ctx->lock);
-}
-
 static void ipa3_uc_is_loaded(void)
 {
 	IPADBG("\n");
@@ -5773,6 +5759,34 @@ static inline void ipa3_enable_napi_lan_rx(void)
 		napi_enable(&ipa3_ctx->napi_lan_rx);
 }
 
+static inline void ipa3_register_to_fmwk(void)
+{
+	struct ipa_core_data data;
+
+	data.ipa_tx_dp = ipa3_tx_dp;
+
+	if (ipa_fmwk_register_ipa(&data)) {
+		IPAERR("couldn't register to IPA framework\n");
+	}
+}
+
+void ipa3_notify_clients_registered(void)
+{
+	bool reg = false;
+
+	mutex_lock(&ipa3_ctx->lock);
+	if (ipa3_ctx->ipa_initialization_complete)
+		reg = true;
+	ipa3_ctx->clients_registered = true;
+	mutex_unlock(&ipa3_ctx->lock);
+
+	if (reg) {
+		IPADBG("register to fmwk\n");
+		ipa3_register_to_fmwk();
+	}
+}
+EXPORT_SYMBOL(ipa3_notify_clients_registered);
+
 /**
  * ipa3_post_init() - Initialize the IPA Driver (Part II).
  * This part contains all initialization which requires interaction with
@@ -5806,6 +5820,7 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
 	struct ipa3_flt_tbl *flt_tbl;
 	int i;
 	struct idr *idr;
+	bool reg = false;
 
 	if (ipa3_ctx == NULL) {
 		IPADBG("IPA driver haven't initialized\n");
@@ -6070,9 +6085,14 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
 
 	mutex_lock(&ipa3_ctx->lock);
 	ipa3_ctx->ipa_initialization_complete = true;
+	if (ipa3_ctx->clients_registered)
+		reg = true;
 	mutex_unlock(&ipa3_ctx->lock);
 	ipa3_enable_napi_lan_rx();
-	ipa3_trigger_ipa_ready_cbs();
+	if (reg) {
+		IPADBG("register to fmwk\n");
+		ipa3_register_to_fmwk();
+	}
 	complete_all(&ipa3_ctx->init_completion_obj);
 
 	ipa_ut_module_init();
@@ -6567,7 +6587,6 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
 
 	IPADBG("IPA Driver initialization started\n");
 
-	ipa3_ctx = kzalloc(sizeof(*ipa3_ctx), GFP_KERNEL);
 	if (!ipa3_ctx) {
 		result = -ENOMEM;
 		goto fail_mem_ctx;
@@ -6949,7 +6968,6 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
 	INIT_LIST_HEAD(&ipa3_ctx->msg_wlan_client_list);
 	mutex_init(&ipa3_ctx->msg_wlan_client_lock);
 
-	mutex_init(&ipa3_ctx->lock);
 	mutex_init(&ipa3_ctx->q6_proxy_clk_vote_mutex);
 	mutex_init(&ipa3_ctx->ipa_cne_evt_lock);
 
@@ -7139,8 +7157,6 @@ fail_mem_ctrl:
 fail_tz_unlock_reg:
 	if (ipa3_ctx->logbuf)
 		ipc_log_context_destroy(ipa3_ctx->logbuf);
-	kfree(ipa3_ctx);
-	ipa3_ctx = NULL;
 fail_mem_ctx:
 	return result;
 }
@@ -8496,37 +8512,6 @@ static void ipa_gsi_notify_cb(struct gsi_per_notify *notify)
 	}
 }
 
-int ipa3_register_ipa_ready_cb(void (*ipa_ready_cb)(void *), void *user_data)
-{
-	struct ipa3_ready_cb_info *cb_info = NULL;
-
-	/* check ipa3_ctx existed or not */
-	if (!ipa3_ctx) {
-		IPADBG("IPA driver haven't initialized\n");
-		return -ENXIO;
-	}
-	mutex_lock(&ipa3_ctx->lock);
-	if (ipa3_ctx->ipa_initialization_complete) {
-		mutex_unlock(&ipa3_ctx->lock);
-		IPADBG("IPA driver finished initialization already\n");
-		return -EEXIST;
-	}
-
-	cb_info = kmalloc(sizeof(struct ipa3_ready_cb_info), GFP_KERNEL);
-	if (!cb_info) {
-		mutex_unlock(&ipa3_ctx->lock);
-		return -ENOMEM;
-	}
-
-	cb_info->ready_cb = ipa_ready_cb;
-	cb_info->user_data = user_data;
-
-	list_add_tail(&cb_info->link, &ipa3_ctx->ipa_ready_cb_list);
-	mutex_unlock(&ipa3_ctx->lock);
-
-	return 0;
-}
-
 int ipa3_iommu_map(struct iommu_domain *domain,
 	unsigned long iova, phys_addr_t paddr, size_t size, int prot)
 {

+ 3 - 16
drivers/platform/msm/ipa/ipa_v3/ipa_i.h

@@ -35,6 +35,7 @@
 #include <linux/mailbox_client.h>
 #include <linux/mailbox/qmp.h>
 #include <linux/rmnet_ipa_fd_ioctl.h>
+#include <linux/ipa_fmwk.h>
 
 #define IPA_DEV_NAME_MAX_LEN 15
 #define DRV_NAME "ipa"
@@ -1647,21 +1648,6 @@ struct ipa3_smp2p_info {
 	struct qcom_smem_state *smem_state;
 };
 
-/**
- * struct ipa3_ready_cb_info - A list of all the registrations
- *  for an indication of IPA driver readiness
- *
- * @link: linked list link
- * @ready_cb: callback
- * @user_data: User data
- *
- */
-struct ipa3_ready_cb_info {
-	struct list_head link;
-	ipa_ready_cb ready_cb;
-	void *user_data;
-};
-
 struct ipa_dma_task_info {
 	struct ipa_mem_buffer mem;
 	struct ipahal_imm_cmd_pyld *cmd_pyld;
@@ -2074,6 +2060,7 @@ struct ipa3_context {
 	u32 icc_clk[IPA_ICC_LVL_MAX][IPA_ICC_PATH_MAX][IPA_ICC_TYPE_MAX];
 	struct ipahal_imm_cmd_pyld *coal_cmd_pyld;
 	struct ipa3_app_clock_vote app_clock_vote;
+	bool clients_registered;
 };
 
 struct ipa3_plat_drv_res {
@@ -3143,7 +3130,6 @@ int emulator_load_fws(
 	u32 transport_mem_base,
 	u32 transport_mem_size,
 	enum gsi_ver);
-int ipa3_register_ipa_ready_cb(void (*ipa_ready_cb)(void *), void *user_data);
 const char *ipa_hw_error_str(enum ipa3_hw_errors err_type);
 int ipa_gsi_ch20_wa(void);
 int ipa3_rx_poll(u32 clnt_hdl, int budget);
@@ -3177,6 +3163,7 @@ int ipa3_get_transport_info(
 irq_handler_t ipa3_get_isr(void);
 void ipa_pc_qmp_enable(void);
 u32 ipa3_get_r_rev_version(void);
+void ipa3_notify_clients_registered(void);
 #if defined(CONFIG_IPA3_REGDUMP)
 int ipa_reg_save_init(u32 value);
 void ipa_save_registers(void);

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

@@ -7230,7 +7230,6 @@ int ipa3_bind_api_controller(enum ipa_hw_type ipa_hw_type,
 	api_ctrl->ipa_set_aggr_mode = ipa3_set_aggr_mode;
 	api_ctrl->ipa_set_qcncm_ndp_sig = ipa3_set_qcncm_ndp_sig;
 	api_ctrl->ipa_set_single_ndp_per_mbim = ipa3_set_single_ndp_per_mbim;
-	api_ctrl->ipa_tx_dp = ipa3_tx_dp;
 	api_ctrl->ipa_tx_dp_mul = ipa3_tx_dp_mul;
 	api_ctrl->ipa_free_skb = ipa3_free_skb;
 	api_ctrl->ipa_setup_sys_pipe = ipa3_setup_sys_pipe;
@@ -7317,7 +7316,6 @@ int ipa3_bind_api_controller(enum ipa_hw_type ipa_hw_type,
 	api_ctrl->ipa_get_gsi_ep_info = ipa3_get_gsi_ep_info;
 	api_ctrl->ipa_stop_gsi_channel = ipa3_stop_gsi_channel;
 	api_ctrl->ipa_start_gsi_channel = ipa3_start_gsi_channel;
-	api_ctrl->ipa_register_ipa_ready_cb = ipa3_register_ipa_ready_cb;
 	api_ctrl->ipa_inc_client_enable_clks = ipa3_inc_client_enable_clks;
 	api_ctrl->ipa_dec_client_disable_clks = ipa3_dec_client_disable_clks;
 	api_ctrl->ipa_inc_client_enable_clks_no_block =