linux-brain/drivers/clk/actions
Cristian Ciocaltea 80bd119c7d clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC
[ Upstream commit a8f1f03caa51aa7a69c671aa87c475034db7d368 ]

The following clocks of the Actions Semi Owl S500 SoC have been defined
to use a shared clock factor table 'bisp_factor_table[]': DE[1-2], VCE,
VDE, BISP, SENSOR[0-1]

There are several issues involved in this approach:

* 'bisp_factor_table[]' describes the configuration of a regular 8-rates
  divider, so its usage is redundant. Additionally, judging by the BISP
  clock context, it is incomplete since it maps only 8 out of 12
  possible entries.

* The clocks mentioned above are not identical in terms of the available
  rates, therefore cannot rely on the same factor table. Specifically,
  BISP and SENSOR* are standard 12-rate dividers so their configuration
  should rely on a proper clock div table, while VCE and VDE require a
  factor table that is a actually a subset of the one needed for DE[1-2]
  clocks.

Let's fix this by implementing the following:

* Add new factor tables 'de_factor_table' and 'hde_factor_table' to
  properly handle DE[1-2], VCE and VDE clocks.

* Add a common div table 'std12rate_div_table' for BISP and SENSOR[0-1]
  clocks converted to OWL_COMP_DIV.

* Drop the now unused 'bisp_factor_table[]'.

Additionally, drop the CLK_IGNORE_UNUSED flag for SENSOR[0-1] since
there is no reason to always keep ON those clocks.

Fixes: ed6b4795ec ("clk: actions: Add clock driver for S500 SoC")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/e675820a46cd9930d8d576c6cae61d41c1a8416f.1623354574.git.cristian.ciocaltea@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:53:34 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
owl-common.c clk: actions: Don't reference clk_init_data after registration 2019-08-16 10:19:49 -07:00
owl-common.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-composite.c clk: actions: Add composite clock support 2018-04-06 14:25:18 -07:00
owl-composite.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-divider.c clk: actions: Add divider clock support 2018-04-06 14:18:17 -07:00
owl-divider.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-factor.c clk: actions: Fix factor clk struct member access 2019-09-17 12:54:44 -07:00
owl-factor.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-fixed-factor.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-gate.c clk: actions: Add gate clock support 2018-04-06 14:16:38 -07:00
owl-gate.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-mux.c clk: actions: Add mux clock support 2018-04-06 14:17:46 -07:00
owl-mux.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-pll.c clk: actions: Add configurable PLL delay 2019-02-21 23:58:12 -08:00
owl-pll.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-reset.c clk: actions: Add Actions Semi Owl SoCs Reset Management Unit support 2018-10-16 14:41:39 -07:00
owl-reset.h clk: actions: Use the correct style for SPDX License Identifier 2019-05-01 13:01:07 -07:00
owl-s500.c clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC 2021-07-14 16:53:34 +02:00
owl-s700.c clk: actions: Add Actions Semi S700 SoC Reset Management Unit support 2018-10-16 14:41:47 -07:00
owl-s900.c clk: actions: Add Actions Semi S900 SoC Reset Management Unit support 2018-10-16 14:41:53 -07:00