Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e18ef3bc authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa3: add v2x ethernet pipes



Add cv2x ethernet endpoint configuration changes.

Change-Id: I6d1ac9cb5a282a871722e56f51c7c027b24b6b55
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 52268d35
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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),
};

/**
+28 −12
Original line number Diff line number Diff line
@@ -2770,6 +2770,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,
@@ -2887,6 +2893,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,
@@ -3560,7 +3572,8 @@ bool ipa3_should_pipe_be_suspended(enum ipa_client_type client)
		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_ETHERNET_CONS ||
		client == IPA_CLIENT_ETHERNET2_CONS)
		return true;

	return false;
@@ -5719,6 +5732,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);
@@ -9006,6 +9020,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;
+7 −1
Original line number Diff line number Diff line
/* 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;
};

+4 −1
Original line number Diff line number Diff line
@@ -417,9 +417,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