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

Commit e0447401 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: pil-msa: Add support to disable vote for mss ahb clock"

parents 8d8a84d4 d2ee8e2c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ Optional properties:
			  service.
- qcom,sysmon-id:	platform device id that sysmon is probed with for the subsystem.
- qcom,override-acc: Boolean- Present if we need to override the default ACC settings
- qcom,ahb-clk-vote: Boolean- Present if we need to remove the vote for the mss_cfg_ahb
		     clock after the modem boots up

Example:
	qcom,mss@fc880000 {
+12 −1
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ static void pil_mss_disable_clks(struct q6v5_data *drv)
	clk_disable_unprepare(drv->gpll0_mss_clk);
	clk_disable_unprepare(drv->rom_clk);
	clk_disable_unprepare(drv->axi_clk);
	if (!drv->ahb_clk_vote)
		clk_disable_unprepare(drv->ahb_clk);
}

@@ -252,10 +253,14 @@ int pil_mss_shutdown(struct pil_desc *pil)
int pil_mss_deinit_image(struct pil_desc *pil)
{
	struct modem_data *drv = dev_get_drvdata(pil->dev);
	struct q6v5_data *q6_drv = container_of(pil, struct q6v5_data, desc);
	int ret = 0;

	ret = pil_mss_shutdown(pil);

	if (q6_drv->ahb_clk_vote)
		clk_disable_unprepare(q6_drv->ahb_clk);

	/* In case of any failure where reclaim MBA memory
	 * could not happen, free the memory here */
	if (drv->q6->mba_virt)
@@ -365,6 +370,8 @@ static int pil_mss_reset(struct pil_desc *pil)
err_q6v5_reset:
	modem_log_rmb_regs(drv->rmb_base);
	pil_mss_disable_clks(drv);
	if (drv->ahb_clk_vote)
		clk_disable_unprepare(drv->ahb_clk);
err_clks:
	pil_mss_restart_reg(drv, 1);
err_restart:
@@ -535,6 +542,7 @@ static int pil_msa_mba_verify_blob(struct pil_desc *pil, phys_addr_t phy_addr,
static int pil_msa_mba_auth(struct pil_desc *pil)
{
	struct modem_data *drv = dev_get_drvdata(pil->dev);
	struct q6v5_data *q6_drv = container_of(pil, struct q6v5_data, desc);
	int ret;
	s32 status;

@@ -559,6 +567,9 @@ static int pil_msa_mba_auth(struct pil_desc *pil)

	if (ret)
		modem_log_rmb_regs(drv->rmb_base);
	if (q6_drv->ahb_clk_vote)
		clk_disable_unprepare(q6_drv->ahb_clk);

	return ret;
}

+3 −0
Original line number Diff line number Diff line
@@ -460,6 +460,9 @@ struct q6v5_data *pil_q6v5_init(struct platform_device *pdev)
	drv->override_acc = of_property_read_bool(pdev->dev.of_node,
						"qcom,override-acc");

	drv->ahb_clk_vote = of_property_read_bool(pdev->dev.of_node,
						"qcom,ahb-clk-vote");

	drv->xo = devm_clk_get(&pdev->dev, "xo");
	if (IS_ERR(drv->xo))
		return ERR_CAST(drv->xo);
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ struct q6v5_data {
	bool non_elf_image;
	bool restart_reg_sec;
	bool override_acc;
	bool ahb_clk_vote;
};

int pil_q6v5_make_proxy_votes(struct pil_desc *pil);