clk: renesas: rcar-gen3-cpg: Pass mode pins to rcar_gen3_cpg_init()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 10 Mar 2017 10:36:33 +0000 (11:36 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 21 Mar 2017 10:12:23 +0000 (11:12 +0100)
Pass the mode pin states from the SoC-specific CPG/MSSR driver to the
R-Car Gen3 CPG driver core, as their state will be needed to make some
core clock configuration decisions.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/r8a7795-cpg-mssr.c
drivers/clk/renesas/r8a7796-cpg-mssr.c
drivers/clk/renesas/rcar-gen3-cpg.c
drivers/clk/renesas/rcar-gen3-cpg.h

index 608178618da87bef03001f380adb6b2b6ff65e26..4699f416e275d924dc7254ac0ec5cf296704e1c8 100644 (file)
@@ -330,7 +330,7 @@ static int __init r8a7795_cpg_mssr_init(struct device *dev)
                return -EINVAL;
        }
 
-       return rcar_gen3_cpg_init(cpg_pll_config, CLK_EXTALR);
+       return rcar_gen3_cpg_init(cpg_pll_config, CLK_EXTALR, cpg_mode);
 }
 
 const struct cpg_mssr_info r8a7795_cpg_mssr_info __initconst = {
index f7787101b8d0406ce8a3dd69fa7251bdf2efb04b..9d114b31b0731b5ec691717a8519bc8ba2614218 100644 (file)
@@ -273,7 +273,7 @@ static int __init r8a7796_cpg_mssr_init(struct device *dev)
                return -EINVAL;
        }
 
-       return rcar_gen3_cpg_init(cpg_pll_config, CLK_EXTALR);
+       return rcar_gen3_cpg_init(cpg_pll_config, CLK_EXTALR, cpg_mode);
 }
 
 const struct cpg_mssr_info r8a7796_cpg_mssr_info __initconst = {
index 742f6dc7c15653ef5b51bc9d4f3da9b1ebe75c47..d395bb8c22f575cf412d3f90ee6fbd4c22ae59d8 100644 (file)
@@ -247,6 +247,7 @@ static struct clk * __init cpg_sd_clk_register(const struct cpg_core_clk *core,
 
 static const struct rcar_gen3_cpg_pll_config *cpg_pll_config __initdata;
 static unsigned int cpg_clk_extalr __initdata;
+static u32 cpg_mode __initdata;
 
 struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
        const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
@@ -334,9 +335,10 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 }
 
 int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config *config,
-                             unsigned int clk_extalr)
+                             unsigned int clk_extalr, u32 mode)
 {
        cpg_pll_config = config;
        cpg_clk_extalr = clk_extalr;
+       cpg_mode = mode;
        return 0;
 }
index f788f481dd42cdf65ddfac1d4067836e87093f59..073be54b5d038ae39995c0450310fdbfe468091f 100644 (file)
@@ -37,6 +37,6 @@ struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
        const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
        struct clk **clks, void __iomem *base);
 int rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config *config,
-                      unsigned int clk_extalr);
+                      unsigned int clk_extalr, u32 mode);
 
 #endif