| 939b61f6 | 05-May-2023 |
Maxime Ripard <[email protected]> |
clk: actions: composite: fact: Switch to determine_rate
The Actions composite factor clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation.
This is a b
clk: actions: composite: fact: Switch to determine_rate
The Actions composite factor clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation.
This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most likely candidate to trigger that parent change is a call to clk_set_rate(), with determine_rate() figuring out which parent is the best suited for a given rate.
The other trigger would be a call to clk_set_parent(), but it's far less used, and it doesn't look like there's any obvious user for that clock.
So, the set_parent hook is effectively unused, possibly because of an oversight. However, it could also be an explicit decision by the original author to avoid any reparenting but through an explicit call to clk_set_parent().
The driver does implement round_rate() though, which means that we can change the rate of the clock, but we will never get to change the parent.
However, It's hard to tell whether it's been done on purpose or not.
Since we'll start mandating a determine_rate() implementation, let's convert the round_rate() implementation to a determine_rate(), which will also make the current behavior explicit. And if it was an oversight, the clock behaviour can be adjusted later on.
Cc: "Andreas Färber" <[email protected]> Cc: Manivannan Sadhasivam <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| 44077406 | 05-May-2023 |
Maxime Ripard <[email protected]> |
clk: actions: composite: div: Switch to determine_rate
The Actions composite divider clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation.
This is a b
clk: actions: composite: div: Switch to determine_rate
The Actions composite divider clocks implements a mux with a set_parent hook, but doesn't provide a determine_rate implementation.
This is a bit odd, since set_parent() is there to, as its name implies, change the parent of a clock. However, the most likely candidate to trigger that parent change is a call to clk_set_rate(), with determine_rate() figuring out which parent is the best suited for a given rate.
The other trigger would be a call to clk_set_parent(), but it's far less used, and it doesn't look like there's any obvious user for that clock.
So, the set_parent hook is effectively unused, possibly because of an oversight. However, it could also be an explicit decision by the original author to avoid any reparenting but through an explicit call to clk_set_parent().
The driver does implement round_rate() though, which means that we can change the rate of the clock, but we will never get to change the parent.
However, It's hard to tell whether it's been done on purpose or not.
Since we'll start mandating a determine_rate() implementation, let's convert the round_rate() implementation to a determine_rate(), which will also make the current behavior explicit. And if it was an oversight, the clock behaviour can be adjusted later on.
Cc: "Andreas Färber" <[email protected]> Cc: Manivannan Sadhasivam <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| db01868f | 10-Jun-2021 |
Cristian Ciocaltea <[email protected]> |
clk: actions: Add NIC and ETHERNET clock support for Actions S500 SoC
Add support for the missing NIC and ETHERNET clocks in the Actions Semi Owl S500 SoC clock driver.
Additionally, change APB clo
clk: actions: Add NIC and ETHERNET clock support for Actions S500 SoC
Add support for the missing NIC and ETHERNET clocks in the Actions Semi Owl S500 SoC clock driver.
Additionally, change APB clock parent from AHB to the newly added NIC.
Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/d62e4f1f85c5cef05be14d9e8143e88bbddd2e0f.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| fd90b5b9 | 10-Jun-2021 |
Cristian Ciocaltea <[email protected]> |
clk: actions: Fix AHPPREDIV-H-AHB clock chain on Owl S500 SoC
There are a few issues with the setup of the Actions Semi Owl S500 SoC's clock chain involving AHPPREDIV, H and AHB clocks:
* AHBPREDIV
clk: actions: Fix AHPPREDIV-H-AHB clock chain on Owl S500 SoC
There are a few issues with the setup of the Actions Semi Owl S500 SoC's clock chain involving AHPPREDIV, H and AHB clocks:
* AHBPREDIV clock is defined as a muxer only, although it also acts as a divider. * H clock is using a wrong divider register offset * AHB is defined as a multi-rate factor clock, but it is actually just a fixed pass clock.
Let's provide the following fixes:
* Change AHBPREDIV clock to an ungated OWL_COMP_DIV definition. * Use the correct register shift value in the OWL_DIVIDER definition for H clock * Drop the unneeded 'ahb_factor_table[]' and change AHB clock to an ungated OWL_COMP_FIXED_FACTOR definition.
Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://lore.kernel.org/r/21c1abd19a7089b65a34852ac6513961be88cbe1.1623354574.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| a8f1f03c | 10-Jun-2021 |
Cristian Ciocaltea <[email protected]> |
clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC
The following clocks of the Actions Semi Owl S500 SoC have been defined to use a shared clock factor table 'bisp_factor_table[]': DE[
clk: actions: Fix bisp_factor_table based clocks on Owl S500 SoC
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: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/e675820a46cd9930d8d576c6cae61d41c1a8416f.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| fe1f71e3 | 10-Jun-2021 |
Cristian Ciocaltea <[email protected]> |
clk: actions: Fix SD clocks factor table on Owl S500 SoC
Drop the unsupported entries in the factor table used for the SD[0-2] clocks definitions on the Actions Semi Owl S500 SoC.
Fixes: ed6b4795ec
clk: actions: Fix SD clocks factor table on Owl S500 SoC
Drop the unsupported entries in the factor table used for the SD[0-2] clocks definitions on the Actions Semi Owl S500 SoC.
Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/196c948d708a22b8198c95f064a0f6b6820f9980.1623354574.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|
| b81e88de | 03-Jul-2020 |
Cristian Ciocaltea <[email protected]> |
clk: actions: Add APB, DMAC, GPIO clock support for Actions S500 SoC
Add support for the missing APB, DMAC and GPIO clocks in the Actions Semi S500 SoC clock driver.
Signed-off-by: Cristian Ciocalt
clk: actions: Add APB, DMAC, GPIO clock support for Actions S500 SoC
Add support for the missing APB, DMAC and GPIO clocks in the Actions Semi S500 SoC clock driver.
Signed-off-by: Cristian Ciocaltea <[email protected]> Link: https://lore.kernel.org/r/87964ae012e513597b8b4c7be2e7ac332a70087a.1593788312.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
show more ...
|