mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
clk: qcom: clk-rpmh: Fix overflow in BCM vote
Valid frequencies may result in BCM votes that exceed the max HW value. Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't truncated, which can result in lower frequencies than desired. Change-Id: I6d64815ee93c5c604ec0bea86eca00aca570bb9e Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
This commit is contained in:
parent
cb5ed64bbf
commit
d3dbbe0b59
|
|
@ -310,6 +310,9 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
|
|||
cmd_state = 0;
|
||||
}
|
||||
|
||||
if (cmd_state > BCM_TCS_CMD_VOTE_MASK)
|
||||
cmd_state = BCM_TCS_CMD_VOTE_MASK;
|
||||
|
||||
if (c->last_sent_aggr_state != cmd_state) {
|
||||
cmd.addr = c->res_addr;
|
||||
cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user