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

Commit cd4c9aa1 authored by Utkarsh Saxena's avatar Utkarsh Saxena Committed by Mohammed Javid
Browse files

msm: ipa: SDM660 miscellaneous changes



Add support to Enable/Disable uc monitor holb feature.

sdm660 does not  support uc monitor holb feature.
Make changes to get this param via device tree to
support devices which handle holb monitoring via IPA uC.

sdm660 supports WLAN offload. Make changes to configure
wlan pipes on IPA2.6L needed to support WLAN offload.

Change-Id: I07e099ffb7833e4790dda1fd4864f3f61acb2a45
Acked-by: default avatarMohammed Javid <mjavid@qti.qualcomm.com>
Acked-by: default avatarAshok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: default avatarUtkarsh Saxena <usaxena@codeaurora.org>
parent 669aeab5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ memory allocation over a PCIe bridge
					for MHI event rings ids.
- qcom,ipa-tz-unlock-reg:       Register start addresses and ranges which
                                need to be unlocked by TZ.
- qcom,ipa-uc-monitor-holb:   	Boolean context flag to indicate whether
                                monitoring of holb via IPA uc is required.

IPA pipe sub nodes (A2 static pipes configurations):

+11 −0
Original line number Diff line number Diff line
@@ -3899,6 +3899,8 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p,
	ipa_ctx->ipa_wrapper_size = resource_p->ipa_mem_size;
	ipa_ctx->ipa_hw_type = resource_p->ipa_hw_type;
	ipa_ctx->ipa_hw_mode = resource_p->ipa_hw_mode;
	ipa_ctx->ipa_uc_monitor_holb =
		resource_p->ipa_uc_monitor_holb;
	ipa_ctx->use_ipa_teth_bridge = resource_p->use_ipa_teth_bridge;
	ipa_ctx->ipa_bam_remote_mode = resource_p->ipa_bam_remote_mode;
	ipa_ctx->modem_cfg_emb_pipe_flt = resource_p->modem_cfg_emb_pipe_flt;
@@ -4440,6 +4442,7 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	ipa_drv_res->ipa_pipe_mem_size = IPA_PIPE_MEM_SIZE;
	ipa_drv_res->ipa_hw_type = 0;
	ipa_drv_res->ipa_hw_mode = 0;
	ipa_drv_res->ipa_uc_monitor_holb = false;
	ipa_drv_res->ipa_bam_remote_mode = false;
	ipa_drv_res->modem_cfg_emb_pipe_flt = false;
	ipa_drv_res->ipa_wdi2 = false;
@@ -4464,6 +4467,14 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
		IPADBG(": found ipa_drv_res->ipa_hw_mode = %d",
				ipa_drv_res->ipa_hw_mode);

	/* Check ipa_uc_monitor_holb enabled or disabled */
	ipa_drv_res->ipa_uc_monitor_holb =
		of_property_read_bool(pdev->dev.of_node,
		"qcom,ipa-uc-monitor-holb");
	IPADBG(": ipa uc monitor holb = %s\n",
		ipa_drv_res->ipa_uc_monitor_holb
		? "Enabled" : "Disabled");

	/* Get IPA WAN / LAN RX  pool sizes */
	result = of_property_read_u32(pdev->dev.of_node,
			"qcom,wan-rx-ring-size",
+3 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#define IPA_QMAP_HEADER_LENGTH (4)
#define IPA_DL_CHECKSUM_LENGTH (8)
#define IPA_NUM_DESC_PER_SW_TX (2)
#define IPA_GENERIC_RX_POOL_SZ 1000
#define IPA_GENERIC_RX_POOL_SZ 192
#define IPA_UC_FINISH_MAX 6
#define IPA_UC_WAIT_MIN_SLEEP 1000
#define IPA_UC_WAII_MAX_SLEEP 1200
@@ -1175,6 +1175,7 @@ struct ipa_context {
	struct ipa_cne_evt ipa_cne_evt_req_cache[IPA_MAX_NUM_REQ_CACHE];
	int num_ipa_cne_evt_req;
	struct mutex ipa_cne_evt_lock;
	bool ipa_uc_monitor_holb;
};

/**
@@ -1230,6 +1231,7 @@ struct ipa_plat_drv_res {
	bool tethered_flow_control;
	u32 ipa_rx_polling_sleep_msec;
	u32 ipa_polling_iteration;
	bool ipa_uc_monitor_holb;
};

struct ipa_mem_partition {
+6 −2
Original line number Diff line number Diff line
@@ -790,8 +790,12 @@ int ipa_uc_monitor_holb(enum ipa_client_type ipa_client, bool enable)
	int ep_idx;
	int ret;

	/* HOLB monitoring is applicable only to 2.6L. */
	if (ipa_ctx->ipa_hw_type != IPA_HW_v2_6L) {
	/*
	 * HOLB monitoring is applicable to 2.6L.
	 * And also could be enabled from dtsi node.
	 */
	if (ipa_ctx->ipa_hw_type != IPA_HW_v2_6L ||
		!ipa_ctx->ipa_uc_monitor_holb) {
		IPADBG("Not applicable on this target\n");
		return 0;
	}