summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-09 17:35:46 -0600
committerLinux Build Service Account <lnxbuild@localhost>2016-08-09 17:35:47 -0600
commit777125f27bfb2bd37e46c5ee17d595531ced4716 (patch)
tree6e72926338913e57913cd9235464ea560ab198c7 /include/linux
parent9ecb5b34b92ff0ceb2dba6157281f8bb39017d9c (diff)
parente94b446eac88a43e42ecde105275d48b677ea5b3 (diff)
Promotion of kernel.lnx.4.4-160809.
CRs Change ID Subject -------------------------------------------------------------------------------------------------------------- 1023608 I8dcb07bf0a3b9e91b6ec7396d89239fdbd548ac0 msm: kgsl: Correct the size of SDS in snapshot 1007818 I7ab0fe42075ab5b4dfa5c73667f94fb8f0b5cc32 msm: mdss: free the correct layer_list in compat_atomic_ 1035969 1041449 If3b0be88f28da82a08dc4cc67006e8ee8ced5a72 defconfig: arm64: msm: Re-enable qtaguid 1019529 I3df22b7b282fb8ff3269f01b2b258318fc83cbcb msm: kgsl: Reduce CP preemption record size 1047746 If68b68374bfabcdef7ecbf245b72b12c4734f811 ARM: dts: msm: change to use SW AEAD and HMAC algorithm 1050136 I3e2c524ac87d57ae33cd0f28b9c62b2a39ee79ad soc: qcom: gladiator_erp_v2: initialize return value 1037857 Ie111c5d4fb401a04620809b84ba6a7c2e7d1ce88 ARM: dts: msm: add proxy vote for mdss gdsc for msmcobal 1042302 Ifd7c936d8f5d364b78c64aeebd1517d49a5b8936 input: touchscreen: add delay after enabling regulators 1043853 Ie2362610fe922e792e6358b4386c828fdd754fa8 NFC: IRQ gpio usage modification in nfc_read 1024730 Ifa5e9d3f892301685cb48a227ce4967d895499b1 msm: kgsl: Don't read CP_RB_RPTR register without clock 1046753 I1fda7209901cba2746d6d933796a07416cd1b021 icnss: pass fw version to wlan driver 1011462 I5f2caa8b38d99ffd23f03c1dfed1efda273fc2fb msm: kgsl: track GPU active time per frequency 1006012 I221fce9082da0bdd59842455221b896a33a6ce42 msm: kgsl: Add array of page pointers to memdesc 1011427 I7a09c753360eb015ece15c48ae1bb34e30479560 qseecom: Fix ion memory issue during unload app failure 1048160 I033044db83e8af6fb0976d711ea12c2f99291f91 msm: gsi: do not register to inter ee irq 1044351 I61592c167345ebec4cde07f0a72ef059f186b84a ARM: dts: msm: add MDSS DP device node for msmcobalt 1049320 Ic4c5e3cc071898f376070b853112c5014d61272c ASoC: wcd934x: Enable smart boost on WCD9340 codec 1048317 I2f87777684c53408b7f73596f54c46b171469b76 Revert "drivers: mfd: Return EPROBE_DEFER during codec f 1019913 Id03f608ecce341684239cf17998d05af4aa55fb5 msm: ipa: Neutrino IPA offload support 1025326 957844 I25f9cc95bd50a37a4280eecb84bf93d2516d3dc2 msm: vidc: Add Override QP extradata support 1008517 I11ebf618edd25a251d3fb8bb7fbbb886e10d788f msm: kgsl: Correct dma_buf_get function return value che 1021711 I5aada474389e9189abcd38f1bc4854ada91dea87 msm: kgsl: Make VBIF register dump more generic 1022917 I3978d2c53f2b04104d9d279f8acad60326f9405c ASoC: msm8996: Add independent clock support on codec 1036401 I953808314ed92e9da1ac15dc5be3d1d223fee188 Revert "arm64: dma-mapping: Attach IOMMUs as groups" 1043819 I28f786bf0bdea4ecaa17270974ba6d7ffe469828 msm: mdss: add support for adaptive variable refresh fea 1046678 I6d474c2279422abe63ad625f35809fe156e8c465 ARM: dts: msm: Fix QOS settings for Venus on msmcobalt 1043490 I018ebdb0dab1fc13af8d85a273c1c8b477fa1e26 msm: kgsl: Don't allocate memory for microcode if it is 1050153 Ice39d7a1eb0b5f53125cc5d528021a99b9f7ff90 qcom: ssr: Fix possible overflow when copying firmware n 1048801 I02a0cbbf547aacc5e813d027a2f3623cc01e1dd6 qcom-charger: qpnp-smb2: use values from hardware for de 1024179 I316029caa10047828375ae0eab1f1d35d30fccb6 msm: kgsl: Add A5XX_UCHE_DBG_ECO_CNTL_2 to snapshot 1024192 Id9323fa98951e2755fcc6903f84a450bc7ab6169 msm: kgsl: Add vbif version for A540 1037857 Ifbcc1454a1c85eb0163fed969a0c8ceb21d23245 ARM: dts: msm: reserve memory for continuous splash on m 1046507 Iccf9c32400ecc7ffc0afae16f58c38e5d78a5b64 msm: crypto: Fix integer over flow check in qcedev drive 1022917 I7a14a2d0b5455d427f90e02506b996fc615c848a ASoC: msm8996: Add CPE ECPP DAI instance for ECPP path 1047142 Ida3a175d2d1d9d4c2b5bed1e9998dc1af4f626d0 ARM: dts: msm: enabling dynamic FPS for nt35597 video pa 1045163 I3af425f5f0251ec576168f72a2059f85c3be4358 input: touchpanel: Goodix GT915 driver cleanup 1043509 Ic0dedbad67eb04d41afb6add4477f146dfff9784 msm: kgsl: Remove event worker 1043139 Idff814e32fe3f5764f2ef678a68dad4eb0b8046d msm: camera_v2: Fix a return code issue in smmu mapping 1048740 Ie29e7a6a5375e1ec33b000fa09f01aeb7406c8d9 arm64: dma-mapping: don't clear dma ops on bypass detach 1050491 I24f735159a38dffdc4f44babacc4d758cd0a8365 socinfo: Export API for getting SOC serial number 1011881 I90762967e8b7888a775ce4771b6cdb08528b6513 msm: vidc: Fix decoder output buffer size issue 1022917 I762fc1dc6b6527608e73ac5144215ee141570aac ASoC: wcd9335: Add support to enable low power mode on c 1046800 I4a1888fb2302572720260ffea200e5fe6d79a7ba ARM: dts: msm: Add battery data for QRD SKUK device 1036401 I73ff6d6b081b1ee00c8e8ebea42e86160b35aa37 ARM: dts: msm: Remove bogus stream ID from PCIe IOMMU 1022917 Ie7a0a5c57af608cdb42fac9f0f95fe427de8ea1d ARM: dts: msm: Add dmic clock rate on ECPP path for 8996 1050007 I6a848b04756b92f9b1149705176e8f4088b2a945 clk: msm: clock: Add the NO_RATE_CACHE flag to DP clocks 1042302 I4b0c532096f1555561ad33e937cb947e85f987cd input: touchscreen: reduce lpm current of avdd reg for I 1019957 I3b18fd0d1eab28b6b3e5d314539cfbc15210f675 msm: kgsl: Read HLSQ SP/TP registers through debug apert 1024295 Ie796b03ce152774535f593acdf00e900109d303a msm: kgsl: Allocate global buffers through paged memory 1049957 I6fa8f9bde5d5fd0680b5c571ba3cc99bd1f508b1 soc: qcom: core_ctl: Fix possible null-pointer dereferen 1044351 I64c7fe03126d33eb0436c67eba9147dec1169e4d mdss: display-port: add support to use common EDID parse 1047142 Ie4ab889a7d64ba8e33675ee22bf7b808d9ba0a3f msm: mdss: Enable dynamic FPS support for msmcobalt 1030098 I4a1b14fcbca617bc2a43b30af7256edc3920f04c msm: kgsl: Allow 0 as a valid ion file descriptor 1050517 I67804db996f47046242cbec2a85ed66d229a8156 arm64: Select reset controller framework for MSM 1050153 Ic7fd560133d836ef15015ff0ebcdd3fdb13ff6cb soc: qcom: pil: Add error codes to error logs 1044128 I085c2c2ec55106a8fb196f3ef1cfcb42e2b2507c msm: sde: Correct rotator irq handler to acknowledge irq 1043718 Icd535025a2f888e188f89841f32ac5b822f9b20d leds: qpnp-flash-v2: add support to query battery parame Change-Id: I394525ef53202e8a1245b64dd4acabf419ee0bca CRs-Fixed: 1007818, 1030098, 1044128, 1050153, 1037857, 1042302, 1006012, 1036401, 1008517, 1043819, 1050136, 1047142, 1043490, 1046507, 1046678, 1024192, 1021711, 1046753, 1048160, 1022917, 1011462, 1049957, 1048801, 1049320, 1011427, 1019529, 1023608, 1024730, 1044351, 1041449, 1043509, 1048317, 1043139, 1046800, 1048740, 1019913, 1050007, 1050517, 1043718, 1047746, 1050491, 1019957, 957844, 1045163, 1043853, 1035969, 1011881, 1024295, 1024179, 1025326
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipa_uc_offload.h259
1 files changed, 259 insertions, 0 deletions
diff --git a/include/linux/ipa_uc_offload.h b/include/linux/ipa_uc_offload.h
new file mode 100644
index 000000000000..0277e87a2570
--- /dev/null
+++ b/include/linux/ipa_uc_offload.h
@@ -0,0 +1,259 @@
+/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _IPA_UC_OFFLOAD_H_
+#define _IPA_UC_OFFLOAD_H_
+
+#include <linux/ipa.h>
+
+/**
+ * enum ipa_uc_offload_proto
+ * Protocol type: either WDI or Neutrino
+ *
+ * @IPA_UC_WDI: wdi Protocol
+ * @IPA_UC_NTN: Neutrino Protocol
+ */
+enum ipa_uc_offload_proto {
+ IPA_UC_INVALID = 0,
+ IPA_UC_WDI = 1,
+ IPA_UC_NTN = 2,
+ IPA_UC_MAX_PROT_SIZE
+};
+
+/**
+ * struct ipa_hdr_info - Header to install on IPA HW
+ *
+ * @hdr: header to install on IPA HW
+ * @hdr_len: length of header
+ * @dst_mac_addr_offset: destination mac address offset
+ * @hdr_type: layer two header type
+ */
+struct ipa_hdr_info {
+ u8 *hdr;
+ u8 hdr_len;
+ u8 dst_mac_addr_offset;
+ enum ipa_hdr_l2_type hdr_type;
+};
+
+/**
+ * struct ipa_uc_offload_intf_params - parameters for uC offload
+ * interface registration
+ *
+ * @netdev_name: network interface name
+ * @notify: callback for exception/embedded packets
+ * @priv: callback cookie
+ * @hdr_info: header information
+ * @meta_data: meta data if any
+ * @meta_data_mask: meta data mask
+ * @proto: uC offload protocol type
+ * @alt_dst_pipe: alternate routing output pipe
+ */
+struct ipa_uc_offload_intf_params {
+ const char *netdev_name;
+ ipa_notify_cb notify;
+ void *priv;
+ struct ipa_hdr_info hdr_info[IPA_IP_MAX];
+ u8 is_meta_data_valid;
+ u32 meta_data;
+ u32 meta_data_mask;
+ enum ipa_uc_offload_proto proto;
+ enum ipa_client_type alt_dst_pipe;
+};
+
+/**
+ * struct ipa_ntn_setup_info - NTN TX/Rx configuration
+ * @client: type of "client" (IPA_CLIENT_ODU#_PROD/CONS)
+ * @ring_base_pa: physical address of the base of the Tx/Rx ring
+ * @ntn_ring_size: size of the Tx/Rx ring (in terms of elements)
+ * @buff_pool_base_pa: physical address of the base of the Tx/Rx
+ * buffer pool
+ * @num_buffers: Rx/Tx buffer pool size (in terms of elements)
+ * @data_buff_size: size of the each data buffer allocated in DDR
+ * @ntn_reg_base_ptr_pa: physical address of the Tx/Rx NTN Ring's
+ * tail pointer
+ */
+struct ipa_ntn_setup_info {
+ enum ipa_client_type client;
+ phys_addr_t ring_base_pa;
+ u32 ntn_ring_size;
+
+ phys_addr_t buff_pool_base_pa;
+ u32 num_buffers;
+ u32 data_buff_size;
+
+ phys_addr_t ntn_reg_base_ptr_pa;
+};
+
+/**
+ * struct ipa_uc_offload_out_params - out parameters for uC offload
+ *
+ * @clnt_hndl: Handle that client need to pass during
+ * further operations
+ */
+struct ipa_uc_offload_out_params {
+ u32 clnt_hndl;
+};
+
+/**
+ * struct ipa_ntn_conn_in_params - NTN TX/Rx connect parameters
+ * @ul: parameters to connect UL pipe(from Neutrino to IPA)
+ * @dl: parameters to connect DL pipe(from IPA to Neutrino)
+ */
+struct ipa_ntn_conn_in_params {
+ struct ipa_ntn_setup_info ul;
+ struct ipa_ntn_setup_info dl;
+};
+
+/**
+ * struct ipa_ntn_conn_out_params - information provided
+ * to uC offload client
+ * @ul_uc_db_pa: physical address of IPA uc doorbell for UL
+ * @dl_uc_db_pa: physical address of IPA uc doorbell for DL
+ * @clnt_hdl: opaque handle assigned to offload client
+ */
+struct ipa_ntn_conn_out_params {
+ phys_addr_t ul_uc_db_pa;
+ phys_addr_t dl_uc_db_pa;
+};
+
+/**
+ * struct ipa_uc_offload_conn_in_params - information provided by
+ * uC offload client
+ * @clnt_hndl: Handle that return as part of reg interface
+ * @proto: Protocol to use for offload data path
+ * @ntn: uC RX/Tx configuration info
+ */
+struct ipa_uc_offload_conn_in_params {
+ u32 clnt_hndl;
+ union {
+ struct ipa_ntn_conn_in_params ntn;
+ } u;
+};
+
+/**
+ * struct ipa_uc_offload_conn_out_params - information provided
+ * to uC offload client
+ * @ul_uc_db_pa: physical address of IPA uc doorbell for UL
+ * @dl_uc_db_pa: physical address of IPA uc doorbell for DL
+ * @clnt_hdl: opaque handle assigned to offload client
+ */
+struct ipa_uc_offload_conn_out_params {
+ union {
+ struct ipa_ntn_conn_out_params ntn;
+ } u;
+};
+
+/**
+ * struct ipa_perf_profile - To set BandWidth profile
+ *
+ * @client: type of "client" (IPA_CLIENT_ODU#_PROD/CONS)
+ * @max_supported_bw_mbps: maximum bandwidth needed (in Mbps)
+ */
+struct ipa_perf_profile {
+ enum ipa_client_type client;
+ u32 max_supported_bw_mbps;
+};
+
+#if defined CONFIG_IPA || defined CONFIG_IPA3
+
+/**
+ * ipa_uc_offload_reg_intf - Client should call this function to
+ * init uC offload data path
+ *
+ * @init: [in] initialization parameters
+ *
+ * Note: Should not be called from atomic context and only
+ * after checking IPA readiness using ipa_register_ipa_ready_cb()
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_uc_offload_reg_intf(
+ struct ipa_uc_offload_intf_params *in,
+ struct ipa_uc_offload_out_params *out);
+
+/**
+ * ipa_uc_offload_cleanup - Client Driver should call this
+ * function before unload and after disconnect
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_uc_offload_cleanup(u32 clnt_hdl);
+
+/**
+ * ipa_uc_offload_conn_pipes - Client should call this
+ * function to connect uC pipe for offload data path
+ *
+ * @in: [in] input parameters from client
+ * @out: [out] output params to client
+ *
+ * Note: Should not be called from atomic context and only
+ * after checking IPA readiness using ipa_register_ipa_ready_cb()
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_uc_offload_conn_pipes(struct ipa_uc_offload_conn_in_params *in,
+ struct ipa_uc_offload_conn_out_params *out);
+
+/**
+ * ipa_uc_offload_disconn_pipes() - Client should call this
+ * function to disconnect uC pipe to disable offload data path
+ * @clnt_hdl: [in] opaque client handle assigned by IPA to client
+ *
+ * Note: Should not be called from atomic context
+ *
+ * Returns: 0 on success, negative on failure
+ */
+int ipa_uc_offload_disconn_pipes(u32 clnt_hdl);
+
+/**
+ * ipa_set_perf_profile() - Client should call this function to
+ * set IPA clock Band Width based on data rates
+ * @profile: [in] BandWidth profile to use
+ *
+ * Returns: 0 on success, negative on failure
+ */
+int ipa_set_perf_profile(struct ipa_perf_profile *profile);
+
+#else /* (CONFIG_IPA || CONFIG_IPA3) */
+
+static inline int ipa_uc_offload_reg_intf(
+ struct ipa_uc_offload_intf_params *in,
+ struct ipa_uc_offload_out_params *out)
+{
+ return -EPERM;
+}
+
+static inline int ipa_uC_offload_cleanup(u32 clnt_hdl)
+{
+ return -EPERM;
+}
+
+static inline int ipa_uc_offload_conn_pipes(
+ struct ipa_uc_offload_conn_in_params *in,
+ struct ipa_uc_offload_conn_out_params *out)
+{
+ return -EPERM;
+}
+
+static inline int ipa_uc_offload_disconn_pipes(u32 clnt_hdl)
+{
+ return -EPERM;
+}
+
+static inline int ipa_set_perf_profile(struct ipa_perf_profile *profile)
+{
+ return -EPERM;
+}
+
+#endif /* CONFIG_IPA3 */
+
+#endif /* _IPA_UC_OFFLOAD_H_ */