summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-cs2000-cp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* clk: cs2000-cp: convert to SPDX identifiersKuninori Morimoto2018-08-021-4/+1
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* clk: cs2000: mark resume function as __maybe_unusedArnd Bergmann2018-04-161-1/+1
| | | | | | | | | | | | | When power management is disabled, we get a harmless warning: drivers/clk/clk-cs2000-cp.c:544:12: error: 'cs2000_resume' defined but not used [-Werror=unused-function] Marking the function as __maybe_unused lets the compiler silently drop it instead. Fixes: eade4ccdb087 ("clk: cs2000: set pm_ops in hibernate-compatible way") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* clk: cs2000: set pm_ops in hibernate-compatible wayNikita Yushchenko2018-04-061-1/+1
| | | | | | | | | | | | Use SET_LATE_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .resume_early field. This fixes initialization of CS2000 in restore from hibernation in case of kernel used to load image did not initialize CS2000 while kernel being restored had CS2000 initialized. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
* clk: cs2000: Add cs2000_set_saved_rateGaku Inami2017-08-311-4/+10
| | | | | | | | | | | This patch adds the common function to reset the clk rate in order to be able to use it in other cases. Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: cs2000: select 12.20 High Accuracy on LFRatioCfgKuninori Morimoto2017-04-191-0/+11
| | | | | | | | | | | | | cs2000 can select Static/Dynamic ratio based Frequency Synthesizer Mode, it can select 20.12 High Multiplier interpret for 32-bit User Defined Ratio if Dynamic ratio mode. Otherwise it should select 12.20 High Accuracy mode. Current cs2000 is supporting Static ratio mode only, so it should select 12.20 High Accuracy mode, not 20.12 High Multiplier mode. This patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: cs2000: tidyup DEVICE_CFG2 settingsKuninori Morimoto2017-04-191-3/+5
| | | | | | | | | | | | | | DEVICE_CFG2 can select ratio from user defined ratio and LOCKCLK is for it. But current driver sets fixed 0 value. This patch fixes it. Note is that current cs2000 driver is using/supporting only ratio0 (= ch0) now. DEVICE_CFG2 can select STATIC/DYNAMIC ratio mode, and current cs2000 driver is selecting STATIC mode, but it was not understandable on current code. This patch also solve this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: cs2000: enable clock skipping modeKuninori Morimoto2017-04-191-0/+6
| | | | | | | | | CLK_IN skipping mode allows the PLL to maintain lock even when the CLK_IN signal has missing pulses for up to 20 ms (t CS) at a time. This patch enables it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: cs2000: use existing priv_to_dev() to getting struct deviceKuninori Morimoto2017-04-121-5/+3
| | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
* cs-2000-cp: keep Reserved bit on each registerKuninori Morimoto2017-04-121-3/+22
| | | | | | | | | | | | Thus CS2000 datasheet is indicating below, this patch follows it. WARNING: All "Reserved" registers must maintain their default state to ensure proper functional operation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com>
* clk: cs2000: add Suspend/Resume featureKhiem Nguyen2017-01-211-0/+22
| | | | | | | | | | CS2000 needs re-setup when redume, otherwise, it can't handle correct clock rate. Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com> [Kuninori: cleanup original patch] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: cs2000: Migrate to clk_hw based OF and registration APIsStephen Boyd2016-08-251-10/+6
| | | | | | | | | | | Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* clk: add CS2000 Fractional-N driverKuninori Morimoto2015-12-011-0/+510
This patch adds CS2000 Fractional-N driver as clock provider. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> [sboyd@codeaurora.org: Fix unsigned checked for < 0 in cs2000_ratio_get()] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>