clk: qcom: Support 'protected-clocks' property
authorStephen Boyd <swboyd@chromium.org>
Mon, 5 Nov 2018 19:40:11 +0000 (11:40 -0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 21 Nov 2018 08:59:28 +0000 (00:59 -0800)
commitb181b3b801da8893c8eb706e448dd5111b02de60
treef30055abf50e6e83c83d97a8c2973e891d696af8
parent48d7f160b10711f014bf07b574c73452646c9fdd
clk: qcom: Support 'protected-clocks' property

Certain firmware configurations "protect" clks and cause the entire
system to reboot when a non-secure OS such as Linux tries to read or
write protected clk registers. But other firmware configurations allow
reading or writing the same registers, and they may actually require
that the OS use the otherwise locked down clks. Support the
'protected-clocks' property by never registering these protected clks
with the common clk framework. This way, when firmware is protecting
these clks we won't have the chance to ever read or write these
registers and take down the entire system.

Cc: Taniya Das <tdas@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/qcom/common.c