]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom: rpmh-rsc: Clean code reading/writing TCS regs/cmds
authorDouglas Anderson <dianders@chromium.org>
Mon, 13 Apr 2020 17:04:06 +0000 (10:04 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 14 Apr 2020 05:09:17 +0000 (22:09 -0700)
commiteb9d8d82a3ac4c19f99a07101976da762f6fafdf
tree2591dcf1c1f7166528aee6d14dedcdf14e1a7793
parentd60d2ad717da42582db28a9d93824121d35e7f6b
soc: qcom: rpmh-rsc: Clean code reading/writing TCS regs/cmds

This patch makes two changes, both of which should be no-ops:

1. Make read_tcs_reg() / read_tcs_cmd() symmetric to write_tcs_reg() /
   write_tcs_cmd().

2. Change the order of operations in the above functions to make it
   more obvious to me what the math is doing.  Specifically first you
   want to find the right TCS, then the right register, and then
   multiply by the command ID if necessary.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Maulik Shah <mkshah@codeaurora.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/20200413100321.v4.1.I1b754137e8089e46cf33fc2ea270734ec3847ec4@changeid
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/soc/qcom/rpmh-rsc.c