summaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/clkctrl.c
Commit message (Collapse)AuthorAgeFilesLines
* clk: ti: clkctrl: Fix clkdm_name regression for TI_CLK_CLKCTRL_COMPATTony Lindgren2019-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a72d785021cb ("clk: ti: Prepare for remove of OF node name") changed the code to use kasprintf() for provider->clkdm_name but also changed the offset used later on by three. We don't need to change the offset as we already have the extra three characters in the format for kasprintf with "%pOFnxxx". This caused the clocks with TI_CLK_CLKCTRL_COMPAT to have NULL clk->clkdm_name for omap4 and 5. And null clkdm_name can cause module reset, enable, and idle to fail. The issue can also be seen also when enabling DEBUG for clkctrl.c and then we start seeing "clock: could not associate" messages for omap4 and 5 as the generated name is something like "l4_wkclkdm" instead of "l4_wkup_clkdm" that's needed. Let's fix the issue with a partial revert of commit a72d785021cb ("clk: ti: Prepare for remove of OF node name"). ALso note that in general code should not depend on the dts node names. And the node names should be generic types like clock-domain in this case. This could be fixed later by using separate compatible properties for the clockdomains, or by adding soc_device_match() table with reg offsets to the driver. But let's fix the regression first. Fixes: a72d785021cb ("clk: ti: Prepare for remove of OF node name") Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* clk: ti: remove usage of CLK_IS_BASICTero Kristo2019-02-151-1/+1
| | | | | | | | | | Remove the usage of CLK_IS_BASIC flag completely from TI clock driver. In most cases, the use is completely redundant, but in some cases we need to use the new API to check if the clock is an OMAP clock or not. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Keerthy <j-keerthy@ti.com>
* clk: Use of_node_name_eq for node name comparisonsRob Herring2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are. Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: linux-renesas-soc@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> (clk-mstp) Acked-by: Ulf Hansson <ulf.hansson@linaro.org> (ux500) Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* Merge branch 'clk-ti' into clk-nextStephen Boyd2018-10-181-22/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clk-ti: clk: ti: Prepare for remove of OF node name clk: Clean up suspend/resume coding style clk: ti: Add functions to save/restore clk context clk: clk: Add clk_gate_restore_context function clk: Add functions to save/restore clock context en-masse clk: ti: dra7: add new clkctrl data clk: ti: dra7xx: rename existing clkctrl data as compat data clk: ti: am43xx: add new clkctrl data for am43xx clk: ti: am43xx: rename existing clkctrl data as compat data clk: ti: am33xx: add new clkctrl data for am33xx clk: ti: am33xx: rename existing clkctrl data as compat data clk: ti: clkctrl: replace dashes from clkdm name with underscore clk: ti: clkctrl: support multiple clkctrl nodes under a cm node dt-bindings: clock: dra7xx: add clkctrl indices for new data layout dt-bindings: clock: am43xx: add clkctrl indices for new data layout dt-bindings: clock: am33xx: add clkctrl indices for new data layout
| * clk: ti: Prepare for remove of OF node nameStephen Boyd2018-10-161-6/+3
| | | | | | | | | | | | | | | | | | | | Another patch is going to change this code to use %pOFn for DT node names. Fix up the code to make this easy to pick this side of the merge instead of fixing it up in a merge commit later. Cc: Tero Kristo <t-kristo@ti.com> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
| * clk: ti: dra7: add new clkctrl dataTero Kristo2018-10-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | The new clkctrl data layout for dra7xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: dra7xx: rename existing clkctrl data as compat dataTero Kristo2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: am43xx: add new clkctrl data for am43xxTero Kristo2018-10-031-4/+13
| | | | | | | | | | | | | | | | | | | | | | The new clkctrl data layout for am43xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: am43xx: rename existing clkctrl data as compat dataTero Kristo2018-10-031-2/+2
| | | | | | | | | | | | | | | | | | Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: am33xx: add new clkctrl data for am33xxTero Kristo2018-10-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | The new clkctrl data layout for am33xx is split based on clockdomain boundaries. Previously the split was based on CM boundaries. This patch adds the new data as separate data entity, retaining the compatibility data also for now. The compatibility data can be removed once no longer needed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: am33xx: rename existing clkctrl data as compat dataTero Kristo2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | Rename the existing clkctrl data in preparation of upcoming clkdm based split for it. Once the DT data has transitioned also, the compat data can be removed. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: clkctrl: replace dashes from clkdm name with underscoreTero Kristo2018-10-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | The change in the DTS data node naming prevents using underscore within the node names and force usage of dash instead. On the other hand, clockdomains use underscore instead of dash, so this must be replaced within the driver code so that the mapping between the two can be done properly. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
| * clk: ti: clkctrl: support multiple clkctrl nodes under a cm nodeTero Kristo2018-10-031-16/+45
| | | | | | | | | | | | | | | | | | | | | | Currently, only one clkctrl node can be added under a specific CM node due to limitation with the implementation. Modify the code to pick-up clockdomain name from the clkctrl node instead of CM node if provided. Also, add a new flag to the TI clock driver so that both modes can be supported simultaneously. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tony Lindgren <tony@atomide.com>
* | clk: Convert to using %pOFn instead of device_node.nameRob Herring2018-08-301-8/+6
|/ | | | | | | | | | | | | | | In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@kernel.org> Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-omap@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* clk: ti: clkctrl: add support for CLK_SET_RATE_PARENT flagTero Kristo2018-03-081-0/+2
| | | | | | | | | | | Certain clkctrl clocks, notably the display ones, use the CLK_SET_RATE_PARENT feature extensively. Add support for this flag to the clkctrl clocks. Signed-off-by: Tero Kristo <t-kristo@ti.com> Reported-by: Jyri Sarha <jsarha@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Jyri Sarha <jsarha@ti.com>
* clk: ti: dm816: add clkctrl clock dataTero Kristo2017-12-011-0/+3
| | | | | | | Add data for dm816 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: dm814: add clkctrl clock dataTero Kristo2017-12-011-0/+4
| | | | | | | Add data for dm814 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: am43xx: add clkctrl clock dataTero Kristo2017-12-011-0/+6
| | | | | | | | Add data for am43xx clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: ti: am33xx: add clkctrl clock dataTero Kristo2017-12-011-0/+4
| | | | | | | Add data for am33xx clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: dra7: add clkctrl clock dataTero Kristo2017-12-011-0/+4
| | | | | | | Add data for dra7 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: omap5: add clkctrl clock dataTero Kristo2017-12-011-0/+4
| | | | | | | Add data for omap5 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: clkctrl: fix flags for mux and divider opt clocksTero Kristo2017-12-011-2/+10
| | | | | | Flag handling was missing for these two, so add it. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: clkctrl: add support for retrying failed initTero Kristo2017-12-011-1/+11
| | | | | | | | | In case the clkctrl node contains assigned-clock-* entries, registering the provider can fail with -EPROBE_DEFER. In this case, add the provider to the retry_init clock list so it will be cleaned up later. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: ti: clkctrl: use fallback udelay approach if timekeeping is suspendedTero Kristo2017-12-011-1/+13
| | | | | | | | | | | | | | | | | | | | | In certain cases it is possible that the timekeeping has been suspended already when attempting to disable/enable a clkctrl clock. This will happen at least on am43xx platform when attempting to enable / disable the clockevent source itself, burping out a warning from timekeeping core. The sequence of events leading to this: -> timekeeping_suspend() -> clockevents_suspend() -> omap_clkevt_idle() -> omap_hwmod_idle() -> _omap4_clkctrl_clk_disable() -> _omap4_is_timeout() Avoid the issue by checking if the timekeeping is suspended and using the fallback udelay approach for checking timeouts. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: ti: clkctrl: add support for clkdm init for clkctrl clocksTero Kristo2017-12-011-0/+22
| | | | | | | Clkctrl clocks now support clockdomain init also. This will be needed so that hwmod core can drop the support for clockdomain handling. Signed-off-by: Tero Kristo <t-kristo@ti.com>
* clk: ti: clkctrl: fix error messages to print out node name properlyTero Kristo2017-12-011-3/+3
| | | | | | | | | Current node name does not convey any information, as it is always "clk". Instead, print out the full node path, which will tell us better where something went wrong. Signed-off-by: Tero Kristo <t-kristo@ti.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
* clk: ti: omap4: add clkctrl clock dataTero Kristo2017-06-151-0/+5
| | | | | | | | Add data for omap4 clkctrl clocks, and register it within the clkctrl driver. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
* clk: ti: add support for clkctrl clocksTero Kristo2017-06-151-0/+492
Previously, hwmod core has been used for controlling the hwmod level clocks directly. This has certain drawbacks, like being unable to share the clocks for multiple users, missing usecounting and generally being totally incompatible with the common clock framework. This patch adds support for clkctrl clocks for addressing the above issues. These support the modulemode handling, which will replace the direct hwmod clkctrl linkage. Any optional clocks are also supported, gate, mux and divider. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
OpenPOWER on IntegriCloud