]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 1 Jun 2016 12:54:10 +0000 (14:54 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 2 Nov 2016 19:43:51 +0000 (20:43 +0100)
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>
drivers/clk/renesas/r8a7795-cpg-mssr.c

index f255e451e8cafbbf573ee4d447151f91177c1118..726c3d7940b491b9dfc0d0b274e4bf22e4bb6a80 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/device.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
 
@@ -311,7 +312,12 @@ static const struct rcar_gen3_cpg_pll_config cpg_pll_configs[16] __initconst = {
 static int __init r8a7795_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) {