Commit b26ab06d authored by Shawn Guo's avatar Shawn Guo Committed by Bjorn Andersson
Browse files

clk: qcom: smd-rpm: Drop binary value handling for buffered clock



The buffered clock binary value handling added by commit 36354c32
("clk: qcom: smd-rpm: Add .recalc_rate hook for clk_smd_rpm_branch_ops")
is redundant, because buffered clock is branch type, and the binary
value handling for branch clock has been handled by
clk_smd_rpm_prepare/unprepare functions.

Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211031020715.21636-4-shawn.guo@linaro.org
parent b406f5e9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -189,10 +189,6 @@ static int clk_smd_rpm_set_rate_active(struct clk_smd_rpm *r,
		.value = cpu_to_le32(DIV_ROUND_UP(rate, 1000)), /* to kHz */
	};

	/* Buffered clock needs a binary value */
	if (r->rpm_res_type == QCOM_SMD_RPM_CLK_BUF_A)
		req.value = cpu_to_le32(!!req.value);

	return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_ACTIVE_STATE,
				  r->rpm_res_type, r->rpm_clk_id, &req,
				  sizeof(req));
@@ -207,10 +203,6 @@ static int clk_smd_rpm_set_rate_sleep(struct clk_smd_rpm *r,
		.value = cpu_to_le32(DIV_ROUND_UP(rate, 1000)), /* to kHz */
	};

	/* Buffered clock needs a binary value */
	if (r->rpm_res_type == QCOM_SMD_RPM_CLK_BUF_A)
		req.value = cpu_to_le32(!!req.value);

	return qcom_rpm_smd_write(r->rpm, QCOM_SMD_RPM_SLEEP_STATE,
				  r->rpm_res_type, r->rpm_clk_id, &req,
				  sizeof(req));