From ff717b7dab57d18250c32efed2051ac46c1e8401 Mon Sep 17 00:00:00 2001 From: Skylar Chang Date: Sun, 9 Aug 2015 00:10:21 -0700 Subject: msm: ipa: header file change for WDI2.0 structure changes for WDI2.0, wlan needs pass comp_ring_base_pa and comp_ring_wp_pa to ipa-uc Change-Id: Ib0cdd0c7614916e53f2731f61d0399959d4b739d Signed-off-by: Skylar Chang --- include/linux/ipa.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/linux') diff --git a/include/linux/ipa.h b/include/linux/ipa.h index fe99c620b85b..4fc2231c9842 100644 --- a/include/linux/ipa.h +++ b/include/linux/ipa.h @@ -907,12 +907,21 @@ struct IpaHwStatsWDIInfoData_t { * Rx buffers) * @rdy_ring_size: size of the Rx ring in bytes * @rdy_ring_rp_pa: physical address of the location through which IPA uc is + * reading (WDI-1.0) + * @rdy_comp_ring_base_pa: physical address of the base of the Rx completion + * ring (WDI-2.0) + * @rdy_comp_ring_wp_pa: physical address of the location through which IPA + * uc is writing (WDI-2.0) + * @rdy_comp_ring_size: size of the Rx_completion ring in bytes * expected to communicate about the Read pointer into the Rx Ring */ struct ipa_wdi_ul_params { phys_addr_t rdy_ring_base_pa; u32 rdy_ring_size; phys_addr_t rdy_ring_rp_pa; + phys_addr_t rdy_comp_ring_base_pa; + phys_addr_t rdy_comp_ring_wp_pa; + u32 rdy_comp_ring_size; }; /** @@ -926,6 +935,9 @@ struct ipa_wdi_ul_params_smmu { struct sg_table rdy_ring; u32 rdy_ring_size; phys_addr_t rdy_ring_rp_pa; + struct sg_table rdy_comp_ring; + phys_addr_t rdy_comp_ring_wp_pa; + u32 rdy_comp_ring_size; }; /** -- cgit v1.2.3 From b63c02a6187b85ea589fa025805c1377da1c863f Mon Sep 17 00:00:00 2001 From: Skylar Chang Date: Mon, 26 Oct 2015 16:52:28 -0700 Subject: msm: ipa: header change for wlan VA mapping wlan will pass the VA to IPA-driver to let IPA-driver access the values of rdy_ring_rp and rdy_comp_ring_wp to decive when can suspend the WDI pipe Change-Id: I73447c5557d42817ac2214532273e0de638e13d9 Signed-off-by: Skylar Chang --- include/linux/ipa.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/ipa.h b/include/linux/ipa.h index 4fc2231c9842..4e14dd8a36bf 100644 --- a/include/linux/ipa.h +++ b/include/linux/ipa.h @@ -922,6 +922,8 @@ struct ipa_wdi_ul_params { phys_addr_t rdy_comp_ring_base_pa; phys_addr_t rdy_comp_ring_wp_pa; u32 rdy_comp_ring_size; + u32 *rdy_ring_rp_va; + u32 *rdy_comp_ring_wp_va; }; /** -- cgit v1.2.3 From 6f398060896f29f7ee202d4cb6b126bac29f66e2 Mon Sep 17 00:00:00 2001 From: Amir Levy Date: Wed, 6 Apr 2016 17:52:14 +0300 Subject: msm: ipa3: add odu_bridge to ipa_clients folder As part of IPA driver refactoring, a separation has been made between IPA core driver and the IPA clients. odu_bridge driver has moved to the ipa_clients folder and a dedicated header file has been created in order to provide a direct interface between IPA odu_bridge client driver and other drivers without a direct interaction with the IPA core driver. CRs-Fixed: 999935 Change-Id: Ib5109681c62137d1310539daa816d5229bc08098 Signed-off-by: Amir Levy --- include/linux/ipa_odu_bridge.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/linux/ipa_odu_bridge.h (limited to 'include/linux') diff --git a/include/linux/ipa_odu_bridge.h b/include/linux/ipa_odu_bridge.h new file mode 100644 index 000000000000..04b809b70942 --- /dev/null +++ b/include/linux/ipa_odu_bridge.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2012-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_ODO_BRIDGE_H_ +#define _IPA_ODO_BRIDGE_H_ + +#if defined CONFIG_IPA || defined CONFIG_IPA3 + +int odu_bridge_init(struct odu_bridge_params *params); + +int odu_bridge_connect(void); + +int odu_bridge_disconnect(void); + +int odu_bridge_tx_dp(struct sk_buff *skb, struct ipa_tx_meta *metadata); + +int odu_bridge_cleanup(void); + +#endif /* CONFIG_IPA || defined CONFIG_IPA3 */ + +#endif /* _IPA_ODO_BRIDGE_H */ -- cgit v1.2.3 From 3e8eeb698a639e42f89fc21a610803327d3de990 Mon Sep 17 00:00:00 2001 From: Amir Levy Date: Wed, 6 Apr 2016 17:53:44 +0300 Subject: msm: ipa3: remove odu_bridge functions from ipa.h As part of IPA driver refactoring, a separation has been made between IPA core driver and the IPA clients. odu_bridge driver has moved to the ipa_clients folder and a dedicated header file has been created in order to provide a direct interface between IPA odu_bridge client driver and other drivers without a direct interaction with the IPA core driver. This change moves odu_bridge functions and structure from ipa.h to the ipa_odu_bridge.h header. CRs-fixed: 999935 Change-Id: I1b24c4e13daaae3e63c5cacefcbda12b8cfbeeb8 Signed-off-by: Amir Levy --- include/linux/ipa.h | 68 ------------------------------------------ include/linux/ipa_odu_bridge.h | 52 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 68 deletions(-) (limited to 'include/linux') diff --git a/include/linux/ipa.h b/include/linux/ipa.h index 4e14dd8a36bf..3a87177b623f 100644 --- a/include/linux/ipa.h +++ b/include/linux/ipa.h @@ -1051,30 +1051,6 @@ struct ipa_wdi_buffer_info { int result; }; -/** - * struct odu_bridge_params - parameters for odu bridge initialization API - * - * @netdev_name: network interface name - * @priv: private data that will be supplied to client's callback - * @tx_dp_notify: callback for handling SKB. the following event are supported: - * IPA_WRITE_DONE: will be called after client called to odu_bridge_tx_dp() - * Client is expected to free the skb. - * IPA_RECEIVE: will be called for delivering skb to APPS. - * Client is expected to deliver the skb to network stack. - * @send_dl_skb: callback for sending skb on downlink direction to adapter. - * Client is expected to free the skb. - * @device_ethaddr: device Ethernet address in network order. - * @ipa_desc_size: IPA Sys Pipe Desc Size - */ -struct odu_bridge_params { - const char *netdev_name; - void *priv; - ipa_notify_cb tx_dp_notify; - int (*send_dl_skb)(void *priv, struct sk_buff *skb); - u8 device_ethaddr[ETH_ALEN]; - u32 ipa_desc_size; -}; - /** * enum ipa_mhi_event_type - event type for mhi callback * @@ -1437,20 +1413,6 @@ enum ipacm_client_enum ipa_get_client(int pipe_idx); bool ipa_get_client_uplink(int pipe_idx); -/* - * ODU bridge - */ - -int odu_bridge_init(struct odu_bridge_params *params); - -int odu_bridge_connect(void); - -int odu_bridge_disconnect(void); - -int odu_bridge_tx_dp(struct sk_buff *skb, struct ipa_tx_meta *metadata); - -int odu_bridge_cleanup(void); - /* * IPADMA */ @@ -2104,36 +2066,6 @@ static inline bool ipa_get_client_uplink(int pipe_idx) return -EPERM; } - -/* - * ODU bridge - */ -static inline int odu_bridge_init(struct odu_bridge_params *params) -{ - return -EPERM; -} - -static inline int odu_bridge_disconnect(void) -{ - return -EPERM; -} - -static inline int odu_bridge_connect(void) -{ - return -EPERM; -} - -static inline int odu_bridge_tx_dp(struct sk_buff *skb, - struct ipa_tx_meta *metadata) -{ - return -EPERM; -} - -static inline int odu_bridge_cleanup(void) -{ - return -EPERM; -} - /* * IPADMA */ diff --git a/include/linux/ipa_odu_bridge.h b/include/linux/ipa_odu_bridge.h index 04b809b70942..1d9ec737d0a1 100644 --- a/include/linux/ipa_odu_bridge.h +++ b/include/linux/ipa_odu_bridge.h @@ -13,6 +13,30 @@ #ifndef _IPA_ODO_BRIDGE_H_ #define _IPA_ODO_BRIDGE_H_ +/** + * struct odu_bridge_params - parameters for odu bridge initialization API + * + * @netdev_name: network interface name + * @priv: private data that will be supplied to client's callback + * @tx_dp_notify: callback for handling SKB. the following event are supported: + * IPA_WRITE_DONE: will be called after client called to odu_bridge_tx_dp() + * Client is expected to free the skb. + * IPA_RECEIVE: will be called for delivering skb to APPS. + * Client is expected to deliver the skb to network stack. + * @send_dl_skb: callback for sending skb on downlink direction to adapter. + * Client is expected to free the skb. + * @device_ethaddr: device Ethernet address in network order. + * @ipa_desc_size: IPA Sys Pipe Desc Size + */ +struct odu_bridge_params { + const char *netdev_name; + void *priv; + ipa_notify_cb tx_dp_notify; + int (*send_dl_skb)(void *priv, struct sk_buff *skb); + u8 device_ethaddr[ETH_ALEN]; + u32 ipa_desc_size; +}; + #if defined CONFIG_IPA || defined CONFIG_IPA3 int odu_bridge_init(struct odu_bridge_params *params); @@ -25,6 +49,34 @@ int odu_bridge_tx_dp(struct sk_buff *skb, struct ipa_tx_meta *metadata); int odu_bridge_cleanup(void); +#else + +static inline int odu_bridge_init(struct odu_bridge_params *params) +{ + return -EPERM; +} + +static inline int odu_bridge_disconnect(void) +{ + return -EPERM; +} + +static inline int odu_bridge_connect(void) +{ + return -EPERM; +} + +static inline int odu_bridge_tx_dp(struct sk_buff *skb, + struct ipa_tx_meta *metadata) +{ + return -EPERM; +} + +static inline int odu_bridge_cleanup(void) +{ + return -EPERM; +} + #endif /* CONFIG_IPA || defined CONFIG_IPA3 */ #endif /* _IPA_ODO_BRIDGE_H */ -- cgit v1.2.3 From 738453cfdf78ad952c47f4c79ca1d0c76a692e91 Mon Sep 17 00:00:00 2001 From: Amir Levy Date: Wed, 6 Apr 2016 17:54:44 +0300 Subject: msm: ipa3: include ipa.h from ipa_odu_bridge.h In order to allow ipa_odu_bridge clients to include only the dedicated header ipa_odu_bridge.h and also have the symbols of shared IPA structures and definitions, include ipa.h from ipa_odu_bridge.h. The clients of ipa_odu_bridge will use only APIs from ipa_odu_bridge.h. CRs-fixed: 999935 Change-Id: Ic6da089ebd7878f0d7ceebde7cd8e8549c30182e Signed-off-by: Amir Levy --- include/linux/ipa_odu_bridge.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/ipa_odu_bridge.h b/include/linux/ipa_odu_bridge.h index 1d9ec737d0a1..5d30a9784998 100644 --- a/include/linux/ipa_odu_bridge.h +++ b/include/linux/ipa_odu_bridge.h @@ -13,6 +13,8 @@ #ifndef _IPA_ODO_BRIDGE_H_ #define _IPA_ODO_BRIDGE_H_ +#include + /** * struct odu_bridge_params - parameters for odu bridge initialization API * -- cgit v1.2.3 From 9ce80b18e1e1baffbed19350d08dffb442a3b941 Mon Sep 17 00:00:00 2001 From: Sungjun Park Date: Thu, 10 Mar 2016 17:28:09 -0800 Subject: bluetooth: Add WCN3990 power control To support WCN3990 chipset, add control to configure regulators and clock. Change-Id: Ibf0e4a0ebd55adaadb6d26b335c3d0a9edbe8845 Signed-off-by: Sungjun Park --- include/linux/bluetooth-power.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/bluetooth-power.h b/include/linux/bluetooth-power.h index a411520a83b2..7211c48dbc7b 100644 --- a/include/linux/bluetooth-power.h +++ b/include/linux/bluetooth-power.h @@ -27,6 +27,8 @@ struct bt_power_vreg_data { /* voltage levels to be set */ unsigned int low_vol_level; unsigned int high_vol_level; + /* current level to be set */ + unsigned int load_uA; /* * is set voltage supported for this regulator? * false => set voltage is not supported -- cgit v1.2.3