msm: ipa: update IPA driver to the tip of msm-4.4 kernel

The commit contains changes from the following original commits:
commit c114fe5555d0 ("msm: ipa: fix potential race condition ioctls")
commit c6d606203352 ("msm: ipa: WDI2.0: hotspot offload using WDI 2.0
interface")
commit 634732c1bb02 ("msm: ipa3: fix GSI ring DMA allocation
parameters")
commit 915354544a81 ("msm: ipa3: Fix timeout period of IPA resource add
dependency")
commit a1e8c020b542 ("msm: ipa3: Fix wrong parameter to xdci release
function")
commit bd09eb993a1a ("msm: ipa: fix skb recycle logic")
commit b2c8a0dbe6c8 ("msm: ipa: fix memory leak on QMI")
commit c4fddbc45db0 ("msm: ipa: mhi: add perf vote")
commit 7bd2a476f7d8 ("msm: ipa: Allocate memory on send message")
commit b544de499e55 ("msm: ipa3: increase SSR tag timeout")
commit 15dc347f5272 ("msm: ipa3: hal: change FnR prints to low")
commit b0756920f39f ("msm: ipa: unlock WLAN doorbell register access")
commit 0dfb2feb3e79 ("msm: ipa: Recycle wan buffer")
commit 1966a333f80b ("mam: ipa: always add default flt rule at the
end")
commit 9ba1638c4bdb ("msm: ipa3: change FnR prints to low")
commit 8b81dd70999c ("msm: ipa3: fix benign prints on ipa3_usb_init")
commit d51f2f62e4bc ("msm: ipa3: Add specific logs to improve debugging
capabilities")
commit 21fab3e70330 ("msm: ipa: fix mutex_lock with task->state !=
RUNNING")
commit bdb22900877b ("msm: ipa3: Do not wait for IPA DMA_TASK H/W
ACK for GSI")
commit fc5f71883677 ("msm: ipa: fix reference count in rm")
commit cd5f5121db9a ("msm: ipa: update wan pool size on napi enable")
commit 7e079d086ffe ("msm: ipa: Remove obsolete IOMMU domain
attribute")
commit 38b227b0c22f ("msm: ipa: Add guard around nat entries read")
commit 9dc2df841d20 ("msm: ipa: fix static analysis sign issue")
commit 3ce1ef220c57 ("msm: ipa3: add check on qmi-client handler")
commit 5334ff493a3f ("msm: ipa: Fix ipa ready cb return value")

All of these changes come to complete the initial IPA driver snapshot:
commit 9659e593c80a ("msm: ipa: initial commit of IPA driver")

Change-Id: Iad2c7633eb15393202d5ba8b3209363442410160
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
index 23fb2ae..db1f52c 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_i.h
@@ -43,8 +43,6 @@
 #define MTU_BYTE 1500
 
 #define IPA3_MAX_NUM_PIPES 31
-#define IPA_WAN_CONS_DESC_FIFO_SZ 0x5E80
-#define IPA_WAN_NAPI_CONS_RX_POOL_SZ 3000
 #define IPA_SYS_DESC_FIFO_SZ 0x800
 #define IPA_SYS_TX_DATA_DESC_FIFO_SZ 0x1000
 #define IPA_LAN_RX_HEADER_LENGTH (2)
@@ -55,6 +53,8 @@
 #define IPA_UC_FINISH_MAX 6
 #define IPA_UC_WAIT_MIN_SLEEP 1000
 #define IPA_UC_WAII_MAX_SLEEP 1200
+#define IPA_WAN_NAPI_CONS_RX_POOL_SZ (IPA_GENERIC_RX_POOL_SZ*3)
+#define IPA_WAN_CONS_DESC_FIFO_SZ (IPA_SYS_DESC_FIFO_SZ*3)
 
 #define IPA_MAX_STATUS_STAT_NUM 30
 
@@ -481,7 +481,7 @@
 
 struct ipa3_status_stats {
 	struct ipahal_pkt_status status[IPA_MAX_STATUS_STAT_NUM];
-	int curr;
+	unsigned int curr;
 };
 
 /**
@@ -1015,6 +1015,11 @@
 	void *user_data;
 };
 
+struct ipa_tz_unlock_reg_info {
+	u64 reg_addr;
+	u32 size;
+};
+
 /**
  * struct ipa3_context - IPA context
  * @class: pointer to the struct class
@@ -1232,6 +1237,8 @@
 	struct completion init_completion_obj;
 	struct completion uc_loaded_completion_obj;
 	struct ipa3_smp2p_info smp2p_info;
+	u32 ipa_tz_unlock_reg_num;
+	struct ipa_tz_unlock_reg_info *ipa_tz_unlock_reg;
 };
 
 /**
@@ -1270,6 +1277,8 @@
 	bool apply_rg10_wa;
 	bool gsi_ch20_wa;
 	bool tethered_flow_control;
+	u32 ipa_tz_unlock_reg_num;
+	struct ipa_tz_unlock_reg_info *ipa_tz_unlock_reg;
 };
 
 /**
@@ -1830,6 +1839,7 @@
 int ipa3_controller_static_bind(struct ipa3_controller *controller,
 		enum ipa_hw_type ipa_hw_type);
 int ipa3_cfg_route(struct ipahal_reg_route *route);
+int ipa3_send_cmd_timeout(u16 num_desc, struct ipa3_desc *descr, u32 timeout);
 int ipa3_send_cmd(u16 num_desc, struct ipa3_desc *descr);
 int ipa3_cfg_filter(u32 disable);
 int ipa3_pipe_mem_init(u32 start_ofst, u32 size);