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

Commit 1bf430fb authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: support dtsi entry for auto config"

parents 181c1d94 2929dbc5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ memory allocation over a PCIe bridge
				using wdi-2.0 or not
- qcom,ipa-wdi3-over-gsi:       Boolean context flag to indicate whether
                                using wdi-3.0 or not
- qcom,ipa-config-is-auto:      Boolean context flag to indicate ipa to be
                                used in auto config or not
- qcom,bandwidth-vote-for-ipa:	Boolean context flag to indicate whether
				ipa clock voting is done by bandwidth
				voting via msm-bus-scale driver or not
+5 −0
Original line number Diff line number Diff line
@@ -215,6 +215,11 @@ const char *ipa_clients_strings[IPA_CLIENT_MAX] = {
	__stringify(IPA_CLIENT_MHI_PRIME_TETH_PROD),
	__stringify(IPA_CLIENT_MHI_PRIME_TETH_CONS),
	__stringify(IPA_CLIENT_MHI_PRIME_DPL_PROD),
	__stringify(RESERVERD_CONS_103),
	__stringify(IPA_CLIENT_MHI2_PROD),
	__stringify(IPA_CLIENT_MHI2_CONS),
	__stringify(IPA_CLIENT_Q6_CV2X_PROD),
	__stringify(IPA_CLIENT_Q6_CV2X_CONS),
};

/**
+9 −0
Original line number Diff line number Diff line
@@ -6432,6 +6432,7 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
	ipa3_ctx->secure_debug_check_action =
	    resource_p->secure_debug_check_action;
	ipa3_ctx->ipa_mhi_proxy = resource_p->ipa_mhi_proxy;
	ipa3_ctx->ipa_config_is_auto = resource_p->ipa_config_is_auto;

	if (ipa3_ctx->secure_debug_check_action == USE_SCM) {
		if (ipa_is_mem_dump_allowed())
@@ -7089,6 +7090,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	ipa_drv_res->mhi_evid_limits[1] = IPA_MHI_GSI_EVENT_RING_ID_END;
	ipa_drv_res->ipa_fltrt_not_hashable = false;
	ipa_drv_res->ipa_endp_delay_wa = false;
	ipa_drv_res->ipa_config_is_auto = false;

	/* Get IPA HW Version */
	result = of_property_read_u32(pdev->dev.of_node, "qcom,ipa-hw-ver",
@@ -7195,6 +7197,13 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
			ipa_drv_res->ipa_wdi2
			? "True" : "False");

	ipa_drv_res->ipa_config_is_auto =
		of_property_read_bool(pdev->dev.of_node,
		"qcom,ipa-config-is-auto");
	IPADBG(": ipa-config-is-auto = %s\n",
		ipa_drv_res->ipa_config_is_auto
		? "True" : "False");

	ipa_drv_res->ipa_wan_skb_page =
			of_property_read_bool(pdev->dev.of_node,
			"qcom,wan-use-skb-page");
+3 −0
Original line number Diff line number Diff line
@@ -1721,6 +1721,7 @@ struct ipa3_pc_mbox_data {
 * @logbuf: ipc log buffer for high priority messages
 * @logbuf_low: ipc log buffer for low priority messages
 * @ipa_wdi2: using wdi-2.0
 * @ipa_config_is_auto: is this AUTO use case
 * @ipa_fltrt_not_hashable: filter/route rules not hashable
 * @use_64_bit_dma_mask: using 64bits dma mask
 * @ipa_bus_hdl: msm driver handle for the data path bus
@@ -1828,6 +1829,7 @@ struct ipa3_context {
	bool use_ipa_teth_bridge;
	bool modem_cfg_emb_pipe_flt;
	bool ipa_wdi2;
	bool ipa_config_is_auto;
	bool ipa_wdi2_over_gsi;
	bool ipa_wdi3_over_gsi;
	bool ipa_endp_delay_wa;
@@ -1941,6 +1943,7 @@ struct ipa3_plat_drv_res {
	u32 ee;
	bool modem_cfg_emb_pipe_flt;
	bool ipa_wdi2;
	bool ipa_config_is_auto;
	bool ipa_wdi2_over_gsi;
	bool ipa_wdi3_over_gsi;
	bool ipa_fltrt_not_hashable;
+17 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@
#define IPA_v4_5_GROUP_UL_DL		(1)
#define IPA_v4_5_MHI_GROUP_DDR		(1)
#define IPA_v4_5_MHI_GROUP_DMA		(2)
#define IPA_v4_5_GROUP_CV2X			(2)
#define IPA_v4_5_MHI_GROUP_QDSS		(3)
#define IPA_v4_5_GROUP_UC_RX_Q		(4)
#define IPA_v4_5_SRC_GROUP_MAX		(5)
@@ -261,6 +262,8 @@ enum ipa_ver {
	IPA_4_5,
	IPA_4_5_MHI,
	IPA_4_5_APQ,
	IPA_4_5_AUTO,
	IPA_4_5_AUTO_MHI,
	IPA_VER_MAX,
};

@@ -3292,6 +3295,11 @@ static u8 ipa3_get_hw_type_index(void)
			hw_type_index = IPA_4_5_MHI;
		if (ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)
			hw_type_index = IPA_4_5_APQ;
		if (ipa3_ctx->ipa_config_is_auto)
			hw_type_index = IPA_4_5_AUTO;
		if (ipa3_ctx->ipa_config_is_auto &&
			ipa3_ctx->ipa_config_is_mhi)
			hw_type_index = IPA_4_5_AUTO_MHI;
		break;
	default:
		IPAERR("Incorrect IPA version %d\n", ipa3_ctx->ipa_hw_type);
@@ -6939,6 +6947,8 @@ static void ipa3_write_rsrc_grp_type_reg(int group_index,
		break;
	case IPA_4_5:
	case IPA_4_5_MHI:
	case IPA_4_5_AUTO:
	case IPA_4_5_AUTO_MHI:
		if (src) {
			switch (group_index) {
			case IPA_v4_5_MHI_GROUP_PCIE:
@@ -7143,6 +7153,13 @@ void ipa3_set_resorce_groups_min_max_limits(void)
		src_grp_idx_max = IPA_v4_5_SRC_GROUP_MAX;
		dst_grp_idx_max = IPA_v4_5_DST_GROUP_MAX;
		break;
	case IPA_4_5_AUTO:
	case IPA_4_5_AUTO_MHI:
		src_rsrc_type_max = IPA_v4_0_RSRC_GRP_TYPE_SRC_MAX;
		dst_rsrc_type_max = IPA_v4_0_RSRC_GRP_TYPE_DST_MAX;
		src_grp_idx_max = IPA_v4_5_SRC_GROUP_MAX;
		dst_grp_idx_max = IPA_v4_5_DST_GROUP_MAX;
		break;
	default:
		IPAERR("invalid hw type index\n");
		WARN_ON(1);
Loading