diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-06-01 14:54:45 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2016-11-02 20:43:56 +0100 |
commit | 05972d48d23927e9d4932a10c8c172ccee4b1a6d (patch) | |
tree | b1cec78b9069930a9ec7446eaff565b422f98ca9 /drivers/clk | |
parent | 969921e0d2b5a582aa6a28cb2208273a2d5679d6 (diff) | |
download | linux-05972d48d23927e9d4932a10c8c172ccee4b1a6d.tar.gz linux-05972d48d23927e9d4932a10c8c172ccee4b1a6d.tar.bz2 linux-05972d48d23927e9d4932a10c8c172ccee4b1a6d.zip |
clk: renesas: r8a7796: 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 RST module.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c index eb347ed265f2..1c144b21869d 100644 --- a/drivers/clk/renesas/r8a7796-cpg-mssr.c +++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c @@ -16,6 +16,7 @@ #include <linux/device.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/soc/renesas/rcar-rst.h> #include <dt-bindings/clock/r8a7796-cpg-mssr.h> @@ -190,7 +191,12 @@ static const struct rcar_gen3_cpg_pll_config cpg_pll_configs[16] __initconst = { static int __init r8a7796_cpg_mssr_init(struct device *dev) { const struct rcar_gen3_cpg_pll_config *cpg_pll_config; - u32 cpg_mode = rcar_gen3_read_mode_pins(); + u32 cpg_mode; + int error; + + error = rcar_rst_read_mode_pins(&cpg_mode); + if (error) + return error; cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)]; if (!cpg_pll_config->extal_div) { |