]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clk: cs2000: enable clock skipping mode
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 18 Apr 2017 02:18:19 +0000 (02:18 +0000)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 19 Apr 2017 17:18:52 +0000 (10:18 -0700)
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>
drivers/clk/clk-cs2000-cp.c

index 4df38c5ff96c047df78b947e38db6f3f5d671304..a8fa6bdd0e557feba43da00c92a84c3ef7f63532 100644 (file)
@@ -54,6 +54,7 @@
 #define ENDEV2         (0x1)
 
 /* FUNC_CFG1 */
+#define CLKSKIPEN      (1 << 7)
 #define REFCLKDIV(x)   (((x) & 0x3) << 3)
 #define REFCLKDIV_MASK REFCLKDIV(0x3)
 
@@ -122,6 +123,11 @@ static int cs2000_enable_dev_config(struct cs2000_priv *priv, bool enable)
        if (ret < 0)
                return ret;
 
+       ret = cs2000_bset(priv, FUNC_CFG1, CLKSKIPEN,
+                         enable ? CLKSKIPEN : 0);
+       if (ret < 0)
+               return ret;
+
        return 0;
 }