diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-06-01 14:49:41 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-11-02 20:43:45 +0100 |
commit | 931db8a0c646e23f0c5a3e2175742997d7e60ff5 (patch) | |
tree | 3ddc90d341dc813c1622ded618808ff69857cbbe /drivers/clk/renesas/clk-r8a7779.c | |
parent | 578d601cbc514b92bc9ed71fd4fb700180275211 (diff) | |
download | blackbird-obmc-linux-931db8a0c646e23f0c5a3e2175742997d7e60ff5.tar.gz blackbird-obmc-linux-931db8a0c646e23f0c5a3e2175742997d7e60ff5.zip |
clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Diffstat (limited to 'drivers/clk/renesas/clk-r8a7779.c')
-rw-r--r-- | drivers/clk/renesas/clk-r8a7779.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c index cf2a37df03b1..ca7551bcb115 100644 --- a/drivers/clk/renesas/clk-r8a7779.c +++ b/drivers/clk/renesas/clk-r8a7779.c @@ -18,6 +18,7 @@ #include <linux/of_address.h> #include <linux/slab.h> #include <linux/spinlock.h> +#include <linux/soc/renesas/rcar-rst.h> #include <dt-bindings/clock/r8a7779-clock.h> @@ -127,6 +128,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) struct clk **clks; unsigned int i, plla_mult; int num_clks; + u32 mode; + + if (rcar_rst_read_mode_pins(&mode)) + return; num_clks = of_property_count_strings(np, "clock-output-names"); if (num_clks < 0) { @@ -148,8 +153,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) cpg->data.clks = clks; cpg->data.clk_num = num_clks; - config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(cpg_mode)]; - plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(cpg_mode)]; + config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(mode)]; + plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(mode)]; for (i = 0; i < num_clks; ++i) { const char *name; |