kernel-fxtec-pro1x/drivers/clk/actions
Manivannan Sadhasivam 12ed084d51 clk: actions: Fix factor clk struct member access
[ Upstream commit ed309bfb4812e8b31a3eb877e157b8028a49e50c ]

Since the helper "owl_factor_helper_round_rate" is shared between factor
and composite clocks, using the factor clk specific helper function
like "hw_to_owl_factor" to access its members will create issues when
called from composite clk specific code. Hence, pass the "factor_hw"
struct pointer directly instead of fetching it using factor clk specific
helpers.

This issue has been observed when a composite clock like "sd0_clk" tried
to call "owl_factor_helper_round_rate" resulting in pointer dereferencing
error.

While we are at it, let's rename the "clk_val_best" function to
"owl_clk_val_best" since this is an owl SoCs specific helper.

Fixes: 4bb78fc974 ("clk: actions: Add factor clock support")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20190916154546.24982-2-manivannan.sadhasivam@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:51:14 +01:00
..
Kconfig clk: actions: Add S700 SoC clock support 2018-07-25 16:40:54 -07:00
Makefile clk: actions: Add S700 SoC clock support 2018-07-25 16:40:54 -07:00
owl-common.c clk: actions: Don't reference clk_init_data after registration 2019-10-07 18:56:43 +02:00
owl-common.h
owl-composite.c clk: actions: Add composite clock support 2018-04-06 14:25:18 -07:00
owl-composite.h clk: actions: Add composite clock support 2018-04-06 14:25:18 -07:00
owl-divider.c clk: actions: Add divider clock support 2018-04-06 14:18:17 -07:00
owl-divider.h clk: actions: Add divider clock support 2018-04-06 14:18:17 -07:00
owl-factor.c clk: actions: Fix factor clk struct member access 2020-01-27 14:51:14 +01:00
owl-factor.h clk: actions: Add factor clock support 2018-04-06 14:24:40 -07:00
owl-fixed-factor.h clk: actions: Add fixed factor clock support 2018-04-06 14:25:08 -07:00
owl-gate.c
owl-gate.h
owl-mux.c clk: actions: Add mux clock support 2018-04-06 14:17:46 -07:00
owl-mux.h clk: actions: Add mux clock support 2018-04-06 14:17:46 -07:00
owl-pll.c clk: actions: Add pll clock support 2018-04-06 14:25:52 -07:00
owl-pll.h clk: actions: Add pll clock support 2018-04-06 14:25:52 -07:00
owl-s700.c clk: actions: Add S700 SoC clock support 2018-07-25 16:40:54 -07:00
owl-s900.c clk: actions: Add S900 SoC clock support 2018-04-06 14:26:48 -07:00