summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSkylar Chang <chiaweic@codeaurora.org>2016-03-14 15:51:49 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:25:09 -0700
commitf36ae7405af944bb43f807c3e59bcddf47fd41e4 (patch)
treeb754fa2b6e2528147d1127e5ba862f25088603bb /include
parentd2c1940363d41cdfea8ac42c99558472688d3166 (diff)
msm: ipa: snapshot of IPA changes
This snapshot is taken as of msm-3.18 commit d5809484b (Merge "msm: ipa: fix race condition when teardown pipe" ) Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ipa.h329
-rw-r--r--include/linux/ipa_usb.h321
-rw-r--r--include/linux/msm-sps.h2
-rw-r--r--include/linux/rndis_ipa.h4
-rw-r--r--include/uapi/linux/msm_ipa.h4
5 files changed, 352 insertions, 308 deletions
diff --git a/include/linux/ipa.h b/include/linux/ipa.h
index 0c618d31d4ce..a1e32aa775a9 100644
--- a/include/linux/ipa.h
+++ b/include/linux/ipa.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+/* 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
@@ -80,8 +80,8 @@ enum ipa_aggr_type {
* enum ipa_aggr_mode - global aggregation mode
*/
enum ipa_aggr_mode {
- IPA_MBIM,
- IPA_QCNCM,
+ IPA_MBIM_AGGR,
+ IPA_QCNCM_AGGR,
};
/**
@@ -239,6 +239,13 @@ struct ipa_ep_cfg_mode {
* aggregation closure. Valid for Output Pipes only (IPA
* Producer). EOF affects only Pipes configured for
* generic aggregation.
+ * @aggr_hard_byte_limit_en: If set to 1, byte-limit aggregation for this
+ * pipe will apply a hard-limit behavior which will not
+ * allow frames to be closed with more than byte-limit
+ * bytes. If set to 0, previous byte-limit behavior
+ * will apply - frames close once a packet causes the
+ * accumulated byte-count to cross the byte-limit
+ * threshold (closed frame will contain that packet).
*/
struct ipa_ep_cfg_aggr {
enum ipa_aggr_en_type aggr_en;
@@ -246,6 +253,7 @@ struct ipa_ep_cfg_aggr {
u32 aggr_byte_limit;
u32 aggr_time_limit;
u32 aggr_pkt_limit;
+ u32 aggr_hard_byte_limit_en;
};
/**
@@ -323,11 +331,16 @@ enum ipa_cs_offload {
* checksum meta info header (4 bytes) starts (UL). Values are 0-15, which
* mean 0 - 60 byte checksum header offset. Valid for input
* pipes only (IPA consumer)
+ * @gen_qmb_master_sel: Select bit for ENDP GEN-QMB master. This is used to
+ * separate DDR & PCIe transactions in-order to limit them as
+ * a group (using MAX_WRITES/READS limiation). Valid for input and
+ * output pipes (IPA consumer+producer)
*/
struct ipa_ep_cfg_cfg {
bool frag_offload_en;
enum ipa_cs_offload cs_offload_en;
u8 cs_metadata_hdr_offset;
+ u8 gen_qmb_master_sel;
};
/**
@@ -1130,151 +1143,6 @@ struct ipa_gsi_ep_config {
int ee;
};
-enum ipa_usb_teth_prot {
- IPA_USB_RNDIS = 0,
- IPA_USB_ECM = 1,
- IPA_USB_RMNET = 2,
- IPA_USB_MBIM = 3,
- IPA_USB_DIAG = 4,
- IPA_USB_MAX_TETH_PROT_SIZE
-};
-
-/**
- * ipa_usb_teth_params - parameters for RDNIS/ECM initialization API
- *
- * @host_ethaddr: host Ethernet address in network order
- * @device_ethaddr: device Ethernet address in network order
- */
-struct ipa_usb_teth_params {
- u8 host_ethaddr[ETH_ALEN];
- u8 device_ethaddr[ETH_ALEN];
-};
-
-enum ipa_usb_notify_event {
- IPA_USB_DEVICE_READY,
- IPA_USB_REMOTE_WAKEUP,
- IPA_USB_SUSPEND_COMPLETED
-};
-
-enum ipa_usb_max_usb_packet_size {
- IPA_USB_HIGH_SPEED_512B = 512,
- IPA_USB_SUPER_SPEED_1024B = 1024
-};
-
-/**
- * ipa_usb_xdci_chan_scratch - xDCI protocol SW config area of
- * channel scratch
- *
- * @last_trb_addr: Address (LSB - based on alignment restrictions) of
- * last TRB in queue. Used to identify roll over case
- * @const_buffer_size: TRB buffer size in KB (similar to IPA aggregation
- * configuration). Must be aligned to max USB Packet Size.
- * Should be 1 <= const_buffer_size <= 31.
- * @depcmd_low_addr: Used to generate "Update Transfer" command
- * @depcmd_hi_addr: Used to generate "Update Transfer" command.
- */
-struct ipa_usb_xdci_chan_scratch {
- u16 last_trb_addr;
- u8 const_buffer_size;
- u32 depcmd_low_addr;
- u8 depcmd_hi_addr;
-};
-
-/**
- * ipa_usb_xdci_chan_params - xDCI channel related properties
- *
- * @client: type of "client"
- * @ipa_ep_cfg: IPA EP configuration
- * @keep_ipa_awake: when true, IPA will not be clock gated
- * @teth_prot: tethering protocol for which the channel is created
- * @gevntcount_low_addr: GEVNCOUNT low address for event scratch
- * @gevntcount_hi_addr: GEVNCOUNT high address for event scratch
- * @dir: channel direction
- * @xfer_ring_len: length of transfer ring in bytes (must be integral
- * multiple of transfer element size - 16B for xDCI)
- * @xfer_ring_base_addr: physical base address of transfer ring. Address must be
- * aligned to xfer_ring_len rounded to power of two
- * @xfer_scratch: parameters for xDCI channel scratch
- *
- */
-struct ipa_usb_xdci_chan_params {
- /* IPA EP params */
- enum ipa_client_type client;
- struct ipa_ep_cfg ipa_ep_cfg;
- bool keep_ipa_awake;
- enum ipa_usb_teth_prot teth_prot;
- /* event ring params */
- u32 gevntcount_low_addr;
- u8 gevntcount_hi_addr;
- /* transfer ring params */
- enum gsi_chan_dir dir;
- u16 xfer_ring_len;
- u64 xfer_ring_base_addr;
- struct ipa_usb_xdci_chan_scratch xfer_scratch;
-};
-
-/**
- * ipa_usb_chan_out_params - out parameters for channel request
- *
- * @clnt_hdl: opaque client handle assigned by IPA to client
- * @db_reg_phs_addr_lsb: Physical address of doorbell register where the 32
- * LSBs of the doorbell value should be written
- * @db_reg_phs_addr_msb: Physical address of doorbell register where the 32
- * MSBs of the doorbell value should be written
- *
- */
-struct ipa_req_chan_out_params {
- u32 clnt_hdl;
- u32 db_reg_phs_addr_lsb;
- u32 db_reg_phs_addr_msb;
-};
-
-/**
- * ipa_usb_teth_prot_params - parameters for connecting RNDIS
- *
- * @max_xfer_size_bytes_to_dev: max size of UL packets in bytes
- * @max_packet_number_to_dev: max number of UL aggregated packets
- * @max_xfer_size_bytes_to_host: max size of DL packets in bytes
- *
- */
-struct ipa_usb_teth_prot_params {
- u32 max_xfer_size_bytes_to_dev;
- u32 max_packet_number_to_dev;
- u32 max_xfer_size_bytes_to_host;
-};
-
-/**
- * ipa_usb_xdci_connect_params - parameters required to start IN, OUT
- * channels, and connect RNDIS/ECM/teth_bridge
- *
- * @max_pkt_size: high speed or full speed
- * @ipa_to_usb_xferrscidx: Transfer Resource Index (XferRscIdx) for IN channel.
- * The hardware-assigned transfer resource index for the
- * transfer, which was returned in response to the
- * Start Transfer command. This field is used for
- * "Update Transfer" command.
- * Should be 0 =< ipa_to_usb_xferrscidx <= 127.
- * @ipa_to_usb_xferrscidx_valid: true if xferRscIdx should be updated for IN
- * channel
- * @usb_to_ipa_xferrscidx: Transfer Resource Index (XferRscIdx) for OUT channel
- * Should be 0 =< usb_to_ipa_xferrscidx <= 127.
- * @usb_to_ipa_xferrscidx_valid: true if xferRscIdx should be updated for OUT
- * channel
- * @teth_prot: tethering protocol
- * @teth_prot_params: parameters for connecting the tethering protocol.
- * @max_supported_bandwidth_mbps: maximum bandwidth need of the client in Mbps
- */
-struct ipa_usb_xdci_connect_params {
- enum ipa_usb_max_usb_packet_size max_pkt_size;
- u8 ipa_to_usb_xferrscidx;
- bool ipa_to_usb_xferrscidx_valid;
- u8 usb_to_ipa_xferrscidx;
- bool usb_to_ipa_xferrscidx_valid;
- enum ipa_usb_teth_prot teth_prot;
- struct ipa_usb_teth_prot_params teth_prot_params;
- u32 max_supported_bandwidth_mbps;
-};
-
#if defined CONFIG_IPA || defined CONFIG_IPA3
/*
@@ -1465,6 +1333,10 @@ int ipa_uc_wdi_get_dbpa(struct ipa_wdi_db_params *out);
* if uC not ready only, register callback
*/
int ipa_uc_reg_rdyCB(struct ipa_wdi_uc_ready_params *param);
+/*
+ * To de-register uC ready callback
+ */
+int ipa_uc_dereg_rdyCB(void);
int ipa_create_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info);
int ipa_release_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info);
@@ -1580,117 +1452,6 @@ int ipa_mhi_resume(void);
void ipa_mhi_destroy(void);
/*
- * IPA_USB
- */
-
-/**
- * ipa_usb_init_teth_prot - Peripheral should call this function to initialize
- * RNDIS/ECM/teth_bridge, prior to calling ipa_usb_xdci_connect()
- *
- * @usb_teth_type: tethering protocol type
- * @teth_params: pointer to tethering protocol parameters.
- * Should be struct ipa_usb_teth_params for RNDIS/ECM,
- * or NULL for teth_bridge
- * @ipa_usb_notify_cb: will be called to notify USB driver on certain events
- * @user_data: cookie used for ipa_usb_notify_cb
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_init_teth_prot(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 *),
- void *user_data);
-
-/**
- * ipa_usb_xdci_connect - Peripheral should call this function to start IN &
- * OUT xDCI channels, and connect RNDIS/ECM/MBIM/RMNET.
- * For DIAG, only starts IN channel.
- *
- * @ul_chan_params: parameters for allocating UL xDCI channel. containing
- * required info on event and transfer rings, and IPA EP
- * configuration
- * @ul_out_params: [out] opaque client handle assigned by IPA to client & DB
- * registers physical address for UL channel
- * @dl_chan_params: parameters for allocating DL xDCI channel. containing
- * required info on event and transfer rings, and IPA EP
- * configuration
- * @dl_out_params: [out] opaque client handle assigned by IPA to client & DB
- * registers physical address for DL channel
- * @connect_params: handles and scratch params of the required channels,
- * tethering protocol and the tethering protocol parameters.
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_connect(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,
- struct ipa_usb_xdci_connect_params *connect_params);
-
-/**
- * ipa_usb_xdci_disconnect - Peripheral should call this function to stop
- * IN & OUT xDCI channels
- * For DIAG, only stops IN channel.
- *
- * @ul_clnt_hdl: client handle received from ipa_usb_xdci_connect()
- * for OUT channel
- * @dl_clnt_hdl: client handle received from ipa_usb_xdci_connect()
- * for IN channel
- * @teth_prot: tethering protocol
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
- enum ipa_usb_teth_prot teth_prot);
-
-/**
- * ipa_usb_deinit_teth_prot - Peripheral should call this function to deinit
- * RNDIS/ECM/MBIM/RMNET
- *
- * @teth_prot: tethering protocol
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot);
-
-/**
- * ipa_usb_xdci_suspend - Peripheral should call this function to suspend
- * IN & OUT xDCI channels
- *
- * @ul_clnt_hdl: client handle previously obtained from
- * ipa_usb_xdci_connect() for OUT channel
- * @dl_clnt_hdl: client handle previously obtained from
- * ipa_usb_xdci_connect() for IN channel
- * @teth_prot: tethering protocol
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
- enum ipa_usb_teth_prot teth_prot);
-
-/**
- * ipa_usb_xdci_resume - Peripheral should call this function to resume
- * IN & OUT xDCI channels
- *
- * @ul_clnt_hdl: client handle received from ipa_usb_xdci_connect()
- * for OUT channel
- * @dl_clnt_hdl: client handle received from ipa_usb_xdci_connect()
- * for IN channel
- *
- * Note: Should not be called from atomic context
- *
- * @Return 0 on success, negative on failure
- */
-int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl);
-
-/*
* mux id
*/
int ipa_write_qmap_id(struct ipa_ioc_write_qmapid *param_in);
@@ -2166,6 +1927,11 @@ static inline int ipa_uc_reg_rdyCB(
return -EPERM;
}
+static inline int ipa_uc_dereg_rdyCB(void)
+{
+ return -EPERM;
+}
+
/*
* Resource manager
@@ -2414,51 +2180,6 @@ static inline void ipa_mhi_destroy(void)
}
/*
- * IPA_USB
- */
-
-static inline int ipa_usb_init_teth_prot(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 *),
- void *user_data)
-{
- return -EPERM;
-}
-
-static inline int ipa_usb_xdci_connect(
- 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,
- struct ipa_usb_xdci_connect_params *connect_params)
-{
- return -EPERM;
-}
-
-static inline int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
- enum ipa_usb_teth_prot teth_prot)
-{
- return -EPERM;
-}
-
-static inline int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot)
-{
- return -EPERM;
-}
-
-static inline int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
- enum ipa_usb_teth_prot teth_prot)
-{
- return -EPERM;
-}
-
-static inline int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl)
-{
- return -EPERM;
-}
-
-/*
* mux id
*/
static inline int ipa_write_qmap_id(struct ipa_ioc_write_qmapid *param_in)
diff --git a/include/linux/ipa_usb.h b/include/linux/ipa_usb.h
new file mode 100644
index 000000000000..c3885c72e5ea
--- /dev/null
+++ b/include/linux/ipa_usb.h
@@ -0,0 +1,321 @@
+/* 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_USB_H_
+#define _IPA_USB_H_
+
+enum ipa_usb_teth_prot {
+ IPA_USB_RNDIS = 0,
+ IPA_USB_ECM = 1,
+ IPA_USB_RMNET = 2,
+ IPA_USB_MBIM = 3,
+ IPA_USB_DIAG = 4,
+ IPA_USB_MAX_TETH_PROT_SIZE
+};
+
+/**
+ * ipa_usb_teth_params - parameters for RDNIS/ECM initialization API
+ *
+ * @host_ethaddr: host Ethernet address in network order
+ * @device_ethaddr: device Ethernet address in network order
+ */
+struct ipa_usb_teth_params {
+ u8 host_ethaddr[ETH_ALEN];
+ u8 device_ethaddr[ETH_ALEN];
+};
+
+enum ipa_usb_notify_event {
+ IPA_USB_DEVICE_READY,
+ IPA_USB_REMOTE_WAKEUP,
+ IPA_USB_SUSPEND_COMPLETED
+};
+
+enum ipa_usb_max_usb_packet_size {
+ IPA_USB_HIGH_SPEED_512B = 512,
+ IPA_USB_SUPER_SPEED_1024B = 1024
+};
+
+/**
+ * ipa_usb_teth_prot_params - parameters for connecting RNDIS
+ *
+ * @max_xfer_size_bytes_to_dev: max size of UL packets in bytes
+ * @max_packet_number_to_dev: max number of UL aggregated packets
+ * @max_xfer_size_bytes_to_host: max size of DL packets in bytes
+ *
+ */
+struct ipa_usb_teth_prot_params {
+ u32 max_xfer_size_bytes_to_dev;
+ u32 max_packet_number_to_dev;
+ u32 max_xfer_size_bytes_to_host;
+};
+
+/**
+ * ipa_usb_xdci_connect_params - parameters required to start IN, OUT
+ * channels, and connect RNDIS/ECM/teth_bridge
+ *
+ * @max_pkt_size: high speed or full speed
+ * @ipa_to_usb_xferrscidx: Transfer Resource Index (XferRscIdx) for IN channel.
+ * The hardware-assigned transfer resource index for the
+ * transfer, which was returned in response to the
+ * Start Transfer command. This field is used for
+ * "Update Transfer" command.
+ * Should be 0 =< ipa_to_usb_xferrscidx <= 127.
+ * @ipa_to_usb_xferrscidx_valid: true if xferRscIdx should be updated for IN
+ * channel
+ * @usb_to_ipa_xferrscidx: Transfer Resource Index (XferRscIdx) for OUT channel
+ * Should be 0 =< usb_to_ipa_xferrscidx <= 127.
+ * @usb_to_ipa_xferrscidx_valid: true if xferRscIdx should be updated for OUT
+ * channel
+ * @teth_prot: tethering protocol
+ * @teth_prot_params: parameters for connecting the tethering protocol.
+ * @max_supported_bandwidth_mbps: maximum bandwidth need of the client in Mbps
+ */
+struct ipa_usb_xdci_connect_params {
+ enum ipa_usb_max_usb_packet_size max_pkt_size;
+ u8 ipa_to_usb_xferrscidx;
+ bool ipa_to_usb_xferrscidx_valid;
+ u8 usb_to_ipa_xferrscidx;
+ bool usb_to_ipa_xferrscidx_valid;
+ enum ipa_usb_teth_prot teth_prot;
+ struct ipa_usb_teth_prot_params teth_prot_params;
+ u32 max_supported_bandwidth_mbps;
+};
+
+/**
+ * ipa_usb_xdci_chan_scratch - xDCI protocol SW config area of
+ * channel scratch
+ *
+ * @last_trb_addr: Address (LSB - based on alignment restrictions) of
+ * last TRB in queue. Used to identify roll over case
+ * @const_buffer_size: TRB buffer size in KB (similar to IPA aggregation
+ * configuration). Must be aligned to max USB Packet Size.
+ * Should be 1 <= const_buffer_size <= 31.
+ * @depcmd_low_addr: Used to generate "Update Transfer" command
+ * @depcmd_hi_addr: Used to generate "Update Transfer" command.
+ */
+struct ipa_usb_xdci_chan_scratch {
+ u16 last_trb_addr;
+ u8 const_buffer_size;
+ u32 depcmd_low_addr;
+ u8 depcmd_hi_addr;
+};
+
+/**
+ * ipa_usb_xdci_chan_params - xDCI channel related properties
+ *
+ * @client: type of "client"
+ * @ipa_ep_cfg: IPA EP configuration
+ * @keep_ipa_awake: when true, IPA will not be clock gated
+ * @teth_prot: tethering protocol for which the channel is created
+ * @gevntcount_low_addr: GEVNCOUNT low address for event scratch
+ * @gevntcount_hi_addr: GEVNCOUNT high address for event scratch
+ * @dir: channel direction
+ * @xfer_ring_len: length of transfer ring in bytes (must be integral
+ * multiple of transfer element size - 16B for xDCI)
+ * @xfer_ring_base_addr: physical base address of transfer ring. Address must be
+ * aligned to xfer_ring_len rounded to power of two
+ * @xfer_scratch: parameters for xDCI channel scratch
+ *
+ */
+struct ipa_usb_xdci_chan_params {
+ /* IPA EP params */
+ enum ipa_client_type client;
+ struct ipa_ep_cfg ipa_ep_cfg;
+ bool keep_ipa_awake;
+ enum ipa_usb_teth_prot teth_prot;
+ /* event ring params */
+ u32 gevntcount_low_addr;
+ u8 gevntcount_hi_addr;
+ /* transfer ring params */
+ enum gsi_chan_dir dir;
+ u16 xfer_ring_len;
+ u64 xfer_ring_base_addr;
+ struct ipa_usb_xdci_chan_scratch xfer_scratch;
+};
+
+/**
+ * ipa_usb_chan_out_params - out parameters for channel request
+ *
+ * @clnt_hdl: opaque client handle assigned by IPA to client
+ * @db_reg_phs_addr_lsb: Physical address of doorbell register where the 32
+ * LSBs of the doorbell value should be written
+ * @db_reg_phs_addr_msb: Physical address of doorbell register where the 32
+ * MSBs of the doorbell value should be written
+ *
+ */
+struct ipa_req_chan_out_params {
+ u32 clnt_hdl;
+ u32 db_reg_phs_addr_lsb;
+ u32 db_reg_phs_addr_msb;
+};
+
+#ifdef CONFIG_IPA3
+
+/**
+ * ipa_usb_init_teth_prot - Peripheral should call this function to initialize
+ * RNDIS/ECM/teth_bridge/DPL, prior to calling ipa_usb_xdci_connect()
+ *
+ * @usb_teth_type: tethering protocol type
+ * @teth_params: pointer to tethering protocol parameters.
+ * Should be struct ipa_usb_teth_params for RNDIS/ECM,
+ * or NULL for teth_bridge
+ * @ipa_usb_notify_cb: will be called to notify USB driver on certain events
+ * @user_data: cookie used for ipa_usb_notify_cb
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_init_teth_prot(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 *),
+ void *user_data);
+
+/**
+ * ipa_usb_xdci_connect - Peripheral should call this function to start IN &
+ * OUT xDCI channels, and connect RNDIS/ECM/MBIM/RMNET.
+ * For DPL, only starts IN channel.
+ *
+ * @ul_chan_params: parameters for allocating UL xDCI channel. containing
+ * required info on event and transfer rings, and IPA EP
+ * configuration
+ * @ul_out_params: [out] opaque client handle assigned by IPA to client & DB
+ * registers physical address for UL channel
+ * @dl_chan_params: parameters for allocating DL xDCI channel. containing
+ * required info on event and transfer rings, and IPA EP
+ * configuration
+ * @dl_out_params: [out] opaque client handle assigned by IPA to client & DB
+ * registers physical address for DL channel
+ * @connect_params: handles and scratch params of the required channels,
+ * tethering protocol and the tethering protocol parameters.
+ *
+ * Note: Should not be called from atomic context
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_xdci_connect(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,
+ struct ipa_usb_xdci_connect_params *connect_params);
+
+/**
+ * ipa_usb_xdci_disconnect - Peripheral should call this function to stop
+ * IN & OUT xDCI channels
+ * For DPL, only stops IN channel.
+ *
+ * @ul_clnt_hdl: client handle received from ipa_usb_xdci_connect()
+ * for OUT channel
+ * @dl_clnt_hdl: client handle received from ipa_usb_xdci_connect()
+ * for IN channel
+ * @teth_prot: tethering protocol
+ *
+ * Note: Should not be called from atomic context
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot);
+
+/**
+ * ipa_usb_deinit_teth_prot - Peripheral should call this function to deinit
+ * RNDIS/ECM/MBIM/RMNET
+ *
+ * @teth_prot: tethering protocol
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot);
+
+/**
+ * ipa_usb_xdci_suspend - Peripheral should call this function to suspend
+ * IN & OUT or DPL xDCI channels
+ *
+ * @ul_clnt_hdl: client handle previously obtained from
+ * ipa_usb_xdci_connect() for OUT channel
+ * @dl_clnt_hdl: client handle previously obtained from
+ * ipa_usb_xdci_connect() for IN channel
+ * @teth_prot: tethering protocol
+ *
+ * Note: Should not be called from atomic context
+ * Note: for DPL, the ul will be ignored as irrelevant
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot);
+
+/**
+ * ipa_usb_xdci_resume - Peripheral should call this function to resume
+ * IN & OUT or DPL xDCI channels
+ *
+ * @ul_clnt_hdl: client handle received from ipa_usb_xdci_connect()
+ * for OUT channel
+ * @dl_clnt_hdl: client handle received from ipa_usb_xdci_connect()
+ * for IN channel
+ * @teth_prot: tethering protocol
+ *
+ * Note: Should not be called from atomic context
+ * Note: for DPL, the ul will be ignored as irrelevant
+ *
+ * @Return 0 on success, negative on failure
+ */
+int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot);
+
+#else /* CONFIG_IPA3 */
+
+static inline int ipa_usb_init_teth_prot(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 *),
+ void *user_data)
+{
+ return -EPERM;
+}
+
+static inline int ipa_usb_xdci_connect(
+ 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,
+ struct ipa_usb_xdci_connect_params *connect_params)
+{
+ return -EPERM;
+}
+
+static inline int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot)
+{
+ return -EPERM;
+}
+
+static inline int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot)
+{
+ return -EPERM;
+}
+
+static inline int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot)
+{
+ return -EPERM;
+}
+
+static inline int ipa_usb_xdci_resume(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
+ enum ipa_usb_teth_prot teth_prot)
+{
+ return -EPERM;
+}
+
+
+#endif /* CONFIG_IPA3 */
+
+#endif /* _IPA_USB_H_ */
diff --git a/include/linux/msm-sps.h b/include/linux/msm-sps.h
index 4533289bcd4c..59a7b82d7808 100644
--- a/include/linux/msm-sps.h
+++ b/include/linux/msm-sps.h
@@ -1621,7 +1621,7 @@ static inline int sps_bam_process_irq(unsigned long dev)
}
static inline int sps_get_bam_addr(unsigned long dev, phys_addr_t *base,
- u32 *size);
+ u32 *size)
{
return -EPERM;
}
diff --git a/include/linux/rndis_ipa.h b/include/linux/rndis_ipa.h
index 14cce939d485..c9e389ddbf2b 100644
--- a/include/linux/rndis_ipa.h
+++ b/include/linux/rndis_ipa.h
@@ -73,12 +73,12 @@ void rndis_ipa_cleanup(void *private);
#else /* CONFIG_RNDIS_IPA*/
-int rndis_ipa_init(struct ipa_usb_init_params *params)
+static inline int rndis_ipa_init(struct ipa_usb_init_params *params)
{
return 0;
}
-int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
+static inline int rndis_ipa_pipe_connect_notify(u32 usb_to_ipa_hdl,
u32 ipa_to_usb_hdl,
u32 max_xfer_size_bytes_to_dev,
u32 max_packet_number_to_dev,
diff --git a/include/uapi/linux/msm_ipa.h b/include/uapi/linux/msm_ipa.h
index a1b1aaab3ff8..54a02107a06e 100644
--- a/include/uapi/linux/msm_ipa.h
+++ b/include/uapi/linux/msm_ipa.h
@@ -395,13 +395,14 @@ enum ipa_tethering_stats_event {
/**
* enum ipa_rm_resource_name - IPA RM clients identification names
*
- * Add new mapping to ipa_rm_dep_prod_index() / ipa_rm_dep_cons_index()
+ * Add new mapping to ipa_rm_prod_index() / ipa_rm_cons_index()
* when adding new entry to this enum.
*/
enum ipa_rm_resource_name {
IPA_RM_RESOURCE_PROD = 0,
IPA_RM_RESOURCE_Q6_PROD = IPA_RM_RESOURCE_PROD,
IPA_RM_RESOURCE_USB_PROD,
+ IPA_RM_RESOURCE_USB_DPL_DUMMY_PROD,
IPA_RM_RESOURCE_HSIC_PROD,
IPA_RM_RESOURCE_STD_ECM_PROD,
IPA_RM_RESOURCE_RNDIS_PROD,
@@ -413,6 +414,7 @@ enum ipa_rm_resource_name {
IPA_RM_RESOURCE_Q6_CONS = IPA_RM_RESOURCE_PROD_MAX,
IPA_RM_RESOURCE_USB_CONS,
+ IPA_RM_RESOURCE_USB_DPL_CONS,
IPA_RM_RESOURCE_HSIC_CONS,
IPA_RM_RESOURCE_WLAN_CONS,
IPA_RM_RESOURCE_APPS_CONS,