mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge "msm: ipa3: add eth ep_pair info"
This commit is contained in:
commit
57fcfe9790
@ -224,6 +224,8 @@ const char *ipa_clients_strings[IPA_CLIENT_MAX] = {
|
||||
__stringify(IPA_CLIENT_MHI_LOW_LAT_CONS),
|
||||
__stringify(IPA_CLIENT_QDSS_PROD),
|
||||
__stringify(IPA_CLIENT_MHI_QDSS_CONS),
|
||||
__stringify(IPA_CLIENT_ETHERNET2_PROD),
|
||||
__stringify(IPA_CLIENT_ETHERNET2_CONS),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -862,6 +862,74 @@ static void ipa3_get_pcie_ep_info(
|
||||
}
|
||||
}
|
||||
|
||||
static void ipa3_get_eth_ep_info(
|
||||
struct ipa_ioc_get_ep_info *ep_info,
|
||||
struct ipa_ep_pair_info *pair_info
|
||||
)
|
||||
{
|
||||
int ep_index = -1, i;
|
||||
|
||||
ep_info->num_ep_pairs = 0;
|
||||
for (i = 0; i < ep_info->max_ep_pairs; i++) {
|
||||
pair_info[i].consumer_pipe_num = -1;
|
||||
pair_info[i].producer_pipe_num = -1;
|
||||
pair_info[i].ep_id = -1;
|
||||
}
|
||||
|
||||
ep_index = ipa3_get_ep_mapping(IPA_CLIENT_ETHERNET2_PROD);
|
||||
|
||||
if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
|
||||
ep_index = ipa3_get_ep_mapping(IPA_CLIENT_ETHERNET2_CONS);
|
||||
if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num =
|
||||
ep_index;
|
||||
pair_info[ep_info->num_ep_pairs].ep_id =
|
||||
IPA_ETH1_EP_ID;
|
||||
|
||||
IPADBG("ep_pair_info consumer_pipe_num %d",
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num);
|
||||
IPADBG(" producer_pipe_num %d ep_id %d\n",
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num,
|
||||
pair_info[ep_info->num_ep_pairs].ep_id);
|
||||
ep_info->num_ep_pairs++;
|
||||
} else {
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num = -1;
|
||||
IPADBG("ep_pair_info consumer_pipe_num %d",
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num);
|
||||
IPADBG(" producer_pipe_num %d ep_id %d\n",
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num,
|
||||
pair_info[ep_info->num_ep_pairs].ep_id);
|
||||
}
|
||||
}
|
||||
|
||||
ep_index = ipa3_get_ep_mapping(IPA_CLIENT_ETHERNET_PROD);
|
||||
|
||||
if ((ep_index != -1) && ipa3_ctx->ep[ep_index].valid) {
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num = ep_index;
|
||||
ep_index = ipa3_get_ep_mapping(IPA_CLIENT_ETHERNET_CONS);
|
||||
if ((ep_index != -1) && (ipa3_ctx->ep[ep_index].valid)) {
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num =
|
||||
ep_index;
|
||||
pair_info[ep_info->num_ep_pairs].ep_id =
|
||||
IPA_ETH0_EP_ID;
|
||||
|
||||
IPADBG("ep_pair_info consumer_pipe_num %d",
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num);
|
||||
IPADBG(" producer_pipe_num %d ep_id %d\n",
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num,
|
||||
pair_info[ep_info->num_ep_pairs].ep_id);
|
||||
ep_info->num_ep_pairs++;
|
||||
} else {
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num = -1;
|
||||
IPADBG("ep_pair_info consumer_pipe_num %d",
|
||||
pair_info[ep_info->num_ep_pairs].consumer_pipe_num);
|
||||
IPADBG(" producer_pipe_num %d ep_id %d\n",
|
||||
pair_info[ep_info->num_ep_pairs].producer_pipe_num,
|
||||
pair_info[ep_info->num_ep_pairs].ep_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int ipa3_get_ep_info(struct ipa_ioc_get_ep_info *ep_info,
|
||||
u8 *param)
|
||||
@ -878,6 +946,10 @@ static int ipa3_get_ep_info(struct ipa_ioc_get_ep_info *ep_info,
|
||||
ipa3_get_pcie_ep_info(ep_info, pair_info);
|
||||
break;
|
||||
|
||||
case IPA_DATA_EP_TYP_ETH:
|
||||
ipa3_get_eth_ep_info(ep_info, pair_info);
|
||||
break;
|
||||
|
||||
default:
|
||||
IPAERR_RL("Undefined ep_type %d\n", ep_info->ep_type);
|
||||
ret = -EFAULT;
|
||||
|
@ -2782,6 +2782,12 @@ static const struct ipa_ep_configuration ipa3_ep_mapping
|
||||
IPA_DPS_HPS_SEQ_TYPE_2ND_PKT_PROCESS_PASS_NO_DEC_UCP,
|
||||
QMB_MASTER_SELECT_DDR,
|
||||
{ 12, 0, 8, 16, IPA_EE_UC, GSI_SMART_PRE_FETCH, 3 } },
|
||||
[IPA_4_5_AUTO][IPA_CLIENT_ETHERNET2_PROD] = {
|
||||
true, IPA_v4_5_GROUP_CV2X,
|
||||
true,
|
||||
IPA_DPS_HPS_SEQ_TYPE_2ND_PKT_PROCESS_PASS_NO_DEC_UCP,
|
||||
QMB_MASTER_SELECT_DDR,
|
||||
{ 10, 13, 8, 16, IPA_EE_UC, GSI_SMART_PRE_FETCH, 3 } },
|
||||
[IPA_4_5_AUTO][IPA_CLIENT_Q6_WAN_PROD] = {
|
||||
true, IPA_v4_5_GROUP_UL_DL,
|
||||
true,
|
||||
@ -2899,6 +2905,12 @@ static const struct ipa_ep_configuration ipa3_ep_mapping
|
||||
IPA_DPS_HPS_SEQ_TYPE_INVALID,
|
||||
QMB_MASTER_SELECT_DDR,
|
||||
{ 28, 1, 9, 9, IPA_EE_UC, GSI_SMART_PRE_FETCH, 4 } },
|
||||
[IPA_4_5_AUTO][IPA_CLIENT_ETHERNET2_CONS] = {
|
||||
true, IPA_v4_5_GROUP_CV2X,
|
||||
false,
|
||||
IPA_DPS_HPS_SEQ_TYPE_INVALID,
|
||||
QMB_MASTER_SELECT_DDR,
|
||||
{ 25, 16, 9, 9, IPA_EE_UC, GSI_SMART_PRE_FETCH, 4 } },
|
||||
[IPA_4_5_AUTO][IPA_CLIENT_Q6_LAN_CONS] = {
|
||||
true, IPA_v4_5_GROUP_UL_DL,
|
||||
false,
|
||||
@ -3561,18 +3573,19 @@ bool ipa3_should_pipe_be_suspended(enum ipa_client_type client)
|
||||
|
||||
if (client == IPA_CLIENT_USB_CONS ||
|
||||
client == IPA_CLIENT_USB2_CONS ||
|
||||
client == IPA_CLIENT_USB_DPL_CONS ||
|
||||
client == IPA_CLIENT_MHI_QDSS_CONS ||
|
||||
client == IPA_CLIENT_MHI_CONS ||
|
||||
client == IPA_CLIENT_MHI_DPL_CONS ||
|
||||
client == IPA_CLIENT_HSIC1_CONS ||
|
||||
client == IPA_CLIENT_WLAN1_CONS ||
|
||||
client == IPA_CLIENT_WLAN2_CONS ||
|
||||
client == IPA_CLIENT_WLAN3_CONS ||
|
||||
client == IPA_CLIENT_WLAN4_CONS ||
|
||||
client == IPA_CLIENT_ODU_EMB_CONS ||
|
||||
client == IPA_CLIENT_ODU_TETH_CONS ||
|
||||
client == IPA_CLIENT_ETHERNET_CONS)
|
||||
client == IPA_CLIENT_USB_DPL_CONS ||
|
||||
client == IPA_CLIENT_MHI_QDSS_CONS ||
|
||||
client == IPA_CLIENT_MHI_CONS ||
|
||||
client == IPA_CLIENT_MHI_DPL_CONS ||
|
||||
client == IPA_CLIENT_HSIC1_CONS ||
|
||||
client == IPA_CLIENT_WLAN1_CONS ||
|
||||
client == IPA_CLIENT_WLAN2_CONS ||
|
||||
client == IPA_CLIENT_WLAN3_CONS ||
|
||||
client == IPA_CLIENT_WLAN4_CONS ||
|
||||
client == IPA_CLIENT_ODU_EMB_CONS ||
|
||||
client == IPA_CLIENT_ODU_TETH_CONS ||
|
||||
client == IPA_CLIENT_ETHERNET_CONS ||
|
||||
client == IPA_CLIENT_ETHERNET2_CONS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -5731,6 +5744,7 @@ int ipa3_write_qmap_id(struct ipa_ioc_write_qmapid *param_in)
|
||||
param_in->client == IPA_CLIENT_HSIC1_PROD ||
|
||||
param_in->client == IPA_CLIENT_ODU_PROD ||
|
||||
param_in->client == IPA_CLIENT_ETHERNET_PROD ||
|
||||
param_in->client == IPA_CLIENT_ETHERNET2_PROD ||
|
||||
param_in->client == IPA_CLIENT_WIGIG_PROD ||
|
||||
param_in->client == IPA_CLIENT_AQC_ETHERNET_PROD) {
|
||||
result = ipa3_cfg_ep_metadata(ipa_ep_idx, &meta);
|
||||
@ -9023,6 +9037,8 @@ int ipa3_get_prot_id(enum ipa_client_type client)
|
||||
case IPA_CLIENT_USB_CONS:
|
||||
prot_id = IPA_HW_PROTOCOL_USB;
|
||||
break;
|
||||
case IPA_CLIENT_ETHERNET2_PROD:
|
||||
case IPA_CLIENT_ETHERNET2_CONS:
|
||||
case IPA_CLIENT_ETHERNET_PROD:
|
||||
case IPA_CLIENT_ETHERNET_CONS:
|
||||
prot_id = IPA_HW_PROTOCOL_ETH;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016-2020, 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
|
||||
@ -26,6 +26,7 @@ enum ipa_uc_offload_proto {
|
||||
IPA_UC_INVALID = 0,
|
||||
IPA_UC_WDI = 1,
|
||||
IPA_UC_NTN = 2,
|
||||
IPA_UC_NTN_V2X = 3,
|
||||
IPA_UC_MAX_PROT_SIZE
|
||||
};
|
||||
|
||||
@ -95,6 +96,7 @@ struct ntn_buff_smmu_map {
|
||||
* @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
|
||||
* @u8 db_mode: 0 means irq mode, 1 means db mode
|
||||
* tail pointer
|
||||
*/
|
||||
struct ipa_ntn_setup_info {
|
||||
@ -117,6 +119,8 @@ struct ipa_ntn_setup_info {
|
||||
u32 data_buff_size;
|
||||
|
||||
phys_addr_t ntn_reg_base_ptr_pa;
|
||||
|
||||
u8 db_mode;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -182,10 +186,12 @@ struct ipa_uc_offload_conn_out_params {
|
||||
* struct ipa_perf_profile - To set BandWidth profile
|
||||
*
|
||||
* @client: type of "client" (IPA_CLIENT_ODU#_PROD/CONS)
|
||||
* @proto: uC offload protocol type
|
||||
* @max_supported_bw_mbps: maximum bandwidth needed (in Mbps)
|
||||
*/
|
||||
struct ipa_perf_profile {
|
||||
enum ipa_client_type client;
|
||||
enum ipa_uc_offload_proto proto;
|
||||
u32 max_supported_bw_mbps;
|
||||
};
|
||||
|
||||
|
@ -419,9 +419,12 @@ enum ipa_client_type {
|
||||
|
||||
IPA_CLIENT_QDSS_PROD = 110,
|
||||
IPA_CLIENT_MHI_QDSS_CONS = 111,
|
||||
|
||||
IPA_CLIENT_ETHERNET2_PROD = 112,
|
||||
IPA_CLIENT_ETHERNET2_CONS = 113,
|
||||
};
|
||||
|
||||
#define IPA_CLIENT_MAX (IPA_CLIENT_MHI_QDSS_CONS + 1)
|
||||
#define IPA_CLIENT_MAX (IPA_CLIENT_ETHERNET2_CONS + 1)
|
||||
|
||||
#define IPA_CLIENT_WLAN2_PROD IPA_CLIENT_A5_WLAN_AMPDU_PROD
|
||||
#define IPA_CLIENT_Q6_DL_NLO_DATA_PROD IPA_CLIENT_Q6_DL_NLO_DATA_PROD
|
||||
@ -2342,13 +2345,17 @@ struct ipa_ioc_gsb_info {
|
||||
#define IPA_PCIE0_EP_ID 21
|
||||
#define IPA_PCIE1_EP_ID 22
|
||||
|
||||
#define IPA_ETH0_EP_ID 31
|
||||
#define IPA_ETH1_EP_ID 32
|
||||
|
||||
enum ipa_peripheral_ep_type {
|
||||
IPA_DATA_EP_TYP_RESERVED = 0,
|
||||
IPA_DATA_EP_TYP_HSIC = 1,
|
||||
IPA_DATA_EP_TYP_HSUSB = 2,
|
||||
IPA_DATA_EP_TYP_PCIE = 3,
|
||||
IPA_DATA_EP_TYP_EMBEDDED = 4,
|
||||
IPA_DATA_EP_TYP_BAM_DMUX,
|
||||
IPA_DATA_EP_TYP_BAM_DMUX = 5,
|
||||
IPA_DATA_EP_TYP_ETH,
|
||||
};
|
||||
|
||||
enum ipa_data_ep_prot_type {
|
||||
|
Loading…
x
Reference in New Issue
Block a user