clk: ingenic: jz4770: Modify C1CLK clock to disable CPU clock stop on idle
authorPaul Cercueil <paul@crapouillou.net>
Sun, 20 May 2018 16:31:15 +0000 (16:31 +0000)
committerStephen Boyd <sboyd@kernel.org>
Sat, 2 Jun 2018 06:21:33 +0000 (23:21 -0700)
When the main processor goes idle, by default its clock is stopped.
However, this also stops the clock of the co-processor.

Here, if the C1CLK clock is enabled, we disable this functionality.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ingenic/jz4770-cgu.c

index 226c8016f6b00fb95336d9dccf8af3da127140eb..a5ad69464e57094e1357bb64ea492f3730330c4e 100644 (file)
@@ -162,9 +162,10 @@ static const struct ingenic_cgu_clk_info jz4770_cgu_clocks[] = {
                .div = { CGU_REG_CPCCR, 16, 1, 4, 22, -1, -1 },
        },
        [JZ4770_CLK_C1CLK] = {
-               "c1clk", CGU_CLK_DIV,
+               "c1clk", CGU_CLK_DIV | CGU_CLK_GATE,
                .parents = { JZ4770_CLK_PLL0, },
                .div = { CGU_REG_CPCCR, 12, 1, 4, 22, -1, -1 },
+               .gate = { CGU_REG_OPCR, 31, true }, // disable CCLK stop on idle
        },
        [JZ4770_CLK_PCLK] = {
                "pclk", CGU_CLK_DIV,