msm: ipa: Move internal definitions to the techpack

Moving the defines used only internally from the global files:
ipa.h
msm_gsi.h

Moving completely the following files from the kernel tree:
ecm_ipa.h
rndis_ipa.h.

Change-Id: Ia55050c2f0b27587459b6d95368f278281329809
Signed-off-by: Ilia Lin <ilial@codeaurora.org>
This commit is contained in:
Ilia Lin 2020-07-26 09:52:08 +03:00 committed by Gerrit - the friendly Code Review server
parent 197f1cc98f
commit da9aa3e8ae
4 changed files with 1 additions and 2310 deletions

View File

@ -1,88 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
*/
#ifndef _ECM_IPA_H_
#define _ECM_IPA_H_
#include <linux/ipa.h>
/*
* @priv: private data given upon ipa_connect
* @evt: event enum, should be IPA_WRITE_DONE
* @data: for tx path the data field is the sent socket buffer.
*/
typedef void (*ecm_ipa_callback)(void *priv,
enum ipa_dp_evt_type evt,
unsigned long data);
/*
* struct ecm_ipa_params - parameters for ecm_ipa initialization API
*
* @device_ready_notify: callback supplied by USB core driver.
* This callback shall be called by the Netdev once the device
* is ready to receive data from tethered PC.
* @ecm_ipa_rx_dp_notify: ecm_ipa will set this callback (out parameter).
* this callback shall be supplied for ipa_connect upon pipe
* connection (USB->IPA), once IPA driver receive data packets
* from USB pipe destined for Apps this callback will be called.
* @ecm_ipa_tx_dp_notify: ecm_ipa will set this callback (out parameter).
* this callback shall be supplied for ipa_connect upon pipe
* connection (IPA->USB), once IPA driver send packets destined
* for USB, IPA BAM will notify for Tx-complete.
* @priv: ecm_ipa will set this pointer (out parameter).
* This pointer will hold the network device for later interaction
* with ecm_ipa APIs
* @host_ethaddr: host Ethernet address in network order
* @device_ethaddr: device Ethernet address in network order
* @skip_ep_cfg: boolean field that determines if Apps-processor
* should or should not configure this end-point.
*/
struct ecm_ipa_params {
void (*device_ready_notify)(void);
ecm_ipa_callback ecm_ipa_rx_dp_notify;
ecm_ipa_callback ecm_ipa_tx_dp_notify;
u8 host_ethaddr[ETH_ALEN];
u8 device_ethaddr[ETH_ALEN];
void *private;
bool skip_ep_cfg;
};
#if IS_ENABLED(CONFIG_ECM_IPA)
int ecm_ipa_init(struct ecm_ipa_params *params);
int ecm_ipa_connect(u32 usb_to_ipa_hdl, u32 ipa_to_usb_hdl,
void *priv);
int ecm_ipa_disconnect(void *priv);
void ecm_ipa_cleanup(void *priv);
#else /* IS_ENABLED(CONFIG_ECM_IPA) */
static inline int ecm_ipa_init(struct ecm_ipa_params *params)
{
return 0;
}
static inline int ecm_ipa_connect(u32 usb_to_ipa_hdl, u32 ipa_to_usb_hdl,
void *priv)
{
return 0;
}
static inline int ecm_ipa_disconnect(void *priv)
{
return 0;
}
static inline void ecm_ipa_cleanup(void *priv)
{
}
#endif /* IS_ENABLED(CONFIG_ECM_IPA) */
#endif /* _ECM_IPA_H_ */

View File

@ -11,7 +11,7 @@
#include <linux/types.h>
#include <linux/if_ether.h>
#include <linux/ipa_qmi_service_v01.h>
#include "linux/msm_gsi.h"
#include <linux/msm_gsi.h>
#define IPA_APPS_MAX_BW_IN_MBPS 700
#define IPA_BW_THRESHOLD_MAX 3
@ -763,45 +763,6 @@ struct ipa_rm_perf_profile {
#define A2_MUX_HDR_NAME_V4_PREF "dmux_hdr_v4_"
#define A2_MUX_HDR_NAME_V6_PREF "dmux_hdr_v6_"
/**
* enum teth_tethering_mode - Tethering mode (Rmnet / MBIM)
*/
enum teth_tethering_mode {
TETH_TETHERING_MODE_RMNET,
TETH_TETHERING_MODE_MBIM,
TETH_TETHERING_MODE_MAX,
};
/**
* teth_bridge_init_params - Parameters used for in/out USB API
* @usb_notify_cb: Callback function which should be used by the caller.
* Output parameter.
* @private_data: Data for the callback function. Should be used by the
* caller. Output parameter.
* @skip_ep_cfg: boolean field that determines if Apps-processor
* should or should not confiugre this end-point.
*/
struct teth_bridge_init_params {
ipa_notify_cb usb_notify_cb;
void *private_data;
enum ipa_client_type client;
bool skip_ep_cfg;
};
/**
* struct teth_bridge_connect_params - Parameters used in teth_bridge_connect()
* @ipa_usb_pipe_hdl: IPA to USB pipe handle, returned from ipa_connect()
* @usb_ipa_pipe_hdl: USB to IPA pipe handle, returned from ipa_connect()
* @tethering_mode: Rmnet or MBIM
* @ipa_client_type: IPA "client" name (IPA_CLIENT_USB#_PROD)
*/
struct teth_bridge_connect_params {
u32 ipa_usb_pipe_hdl;
u32 usb_ipa_pipe_hdl;
enum teth_tethering_mode tethering_mode;
enum ipa_client_type client_type;
};
/**
* struct ipa_tx_data_desc - information needed
* to send data packet to HW link: link to data descriptors
@ -827,19 +788,6 @@ struct ipa_rx_data {
dma_addr_t dma_addr;
};
/**
* struct ipa_rx_page_data - information needed
* to send to wlan driver on receiving data from ipa hw
* @page: skb page
* @dma_addr: DMA address of this Rx packet
* @is_tmp_alloc: skb page from tmp_alloc or recycle_list
*/
struct ipa_rx_page_data {
struct page *page;
dma_addr_t dma_addr;
bool is_tmp_alloc;
};
/**
* enum ipa_irq_type - IPA Interrupt Type
* Used to register handlers for IPA interrupts
@ -879,16 +827,6 @@ enum ipa_irq_type {
IPA_IRQ_MAX
};
/**
* struct ipa_tx_suspend_irq_data - interrupt data for IPA_TX_SUSPEND_IRQ
* @endpoints: bitmask of endpoints which case IPA_TX_SUSPEND_IRQ interrupt
* @dma_addr: DMA address of this Rx packet
*/
struct ipa_tx_suspend_irq_data {
u32 endpoints;
};
/**
* typedef ipa_irq_handler_t - irq handler/callback type
* @param ipa_irq_type - [in] interrupt type
@ -924,33 +862,6 @@ struct IpaHwBamStats_t {
u32 bamUtilCount;
} __packed;
/**
* struct IpaOffloadStatschannel_info - channel info for uC
* stats
* @dir: Direction of the channel ID DIR_CONSUMER =0,
* DIR_PRODUCER = 1
* @ch_id: GSI ch_id of the IPA endpoint for which stats need
* to be calculated, 0xFF means invalid channel or disable stats
* on already stats enabled channel
*/
struct IpaOffloadStatschannel_info {
u8 dir;
u8 ch_id;
} __packed;
/**
* struct IpaHwOffloadStatsAllocCmdData_t - protocol info for uC
* stats start
* @protocol: Enum that indicates the protocol type
* @ch_id_info: GSI ch_id and dir of the IPA endpoint for which stats
* need to be calculated
*/
struct IpaHwOffloadStatsAllocCmdData_t {
u32 protocol;
struct IpaOffloadStatschannel_info
ch_id_info[IPA_MAX_CH_STATS_SUPPORTED];
} __packed;
/**
* struct IpaHwRingStats_t - Structure holding the Ring statistics
*
@ -971,17 +882,6 @@ struct IpaHwRingStats_t {
u32 RingUtilCount;
} __packed;
/**
* struct ipa_uc_dbg_ring_stats - uC dbg stats info for each
* offloading protocol
* @ring: ring stats for each channel
* @ch_num: number of ch supported for given protocol
*/
struct ipa_uc_dbg_ring_stats {
struct IpaHwRingStats_t ring[IPA_MAX_CH_STATS_SUPPORTED];
u8 num_ch;
};
/**
* struct IpaHwStatsWDIRxInfoData_t - Structure holding the WDI Rx channel
* structures
@ -1271,16 +1171,6 @@ struct ipa_gsi_ep_config {
uint8_t prefetch_threshold;
};
/**
* struct ipa_tz_unlock_reg_info - Used in order unlock regions of memory by TZ
* @reg_addr - Physical address of the start of the region
* @size - Size of the region in bytes
*/
struct ipa_tz_unlock_reg_info {
u64 reg_addr;
u64 size;
};
/**
* struct ipa_smmu_in_params - information provided from client
* @ipa_smmu_client_type: clinet requesting for the smmu info.

File diff suppressed because it is too large Load Diff

View File

@ -1,95 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
*/
#ifndef _RNDIS_IPA_H_
#define _RNDIS_IPA_H_
#include <linux/ipa.h>
/*
* @priv: private data given upon ipa_connect
* @evt: event enum, should be IPA_WRITE_DONE
* @data: for tx path the data field is the sent socket buffer.
*/
typedef void (*ipa_callback)(void *priv,
enum ipa_dp_evt_type evt,
unsigned long data);
/*
* struct ipa_usb_init_params - parameters for driver initialization API
*
* @device_ready_notify: callback supplied by USB core driver
* This callback shall be called by the Netdev once the device
* is ready to receive data from tethered PC.
* @ipa_rx_notify: The network driver will set this callback (out parameter).
* this callback shall be supplied for ipa_connect upon pipe
* connection (USB->IPA), once IPA driver receive data packets
* from USB pipe destined for Apps this callback will be called.
* @ipa_tx_notify: The network driver will set this callback (out parameter).
* this callback shall be supplied for ipa_connect upon pipe
* connection (IPA->USB), once IPA driver send packets destined
* for USB, IPA BAM will notify for Tx-complete.
* @host_ethaddr: host Ethernet address in network order
* @device_ethaddr: device Ethernet address in network order
* @private: The network driver will set this pointer (out parameter).
* This pointer will hold the network device for later interaction
* with between USB driver and the network driver.
* @skip_ep_cfg: boolean field that determines if Apps-processor
* should or should not configure this end-point.
*/
struct ipa_usb_init_params {
void (*device_ready_notify)(void);
ipa_callback ipa_rx_notify;
ipa_callback ipa_tx_notify;
u8 host_ethaddr[ETH_ALEN];
u8 device_ethaddr[ETH_ALEN];
void *private;
bool skip_ep_cfg;
};
#if IS_ENABLED(CONFIG_RNDIS_IPA)
int rndis_ipa_init(struct ipa_usb_init_params *params);
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,
u32 max_xfer_size_bytes_to_host,
void *private);
int rndis_ipa_pipe_disconnect_notify(void *private);
void rndis_ipa_cleanup(void *private);
#else /* IS_ENABLED(CONFIG_RNDIS_IPA) */
static inline int rndis_ipa_init(struct ipa_usb_init_params *params)
{
return -ENOMEM;
}
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,
u32 max_xfer_size_bytes_to_host,
void *private)
{
return -ENOMEM;
}
static inline int rndis_ipa_pipe_disconnect_notify(void *private)
{
return -ENOMEM;
}
static inline void rndis_ipa_cleanup(void *private)
{
}
#endif /* IS_ENABLED(CONFIG_RNDIS_IPA) */
#endif /* _RNDIS_IPA_H_ */