Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933869AbcJUNSY (ORCPT ); Fri, 21 Oct 2016 09:18:24 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:45774 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933068AbcJUNRl (ORCPT ); Fri, 21 Oct 2016 09:17:41 -0400 From: Geert Uytterhoeven To: Philipp Zabel , Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm Cc: devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v4 16/23] clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver Date: Fri, 21 Oct 2016 15:17:30 +0200 Message-Id: <1477055857-17936-17-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477055857-17936-1-git-send-email-geert+renesas@glider.be> References: <1477055857-17936-1-git-send-email-geert+renesas@glider.be> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1315 Lines: 44 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 Acked-by: Dirk Behme Reviewed-by: Laurent Pinchart --- v4: - Add Acked-by, Reviewed-by, v3: - New. --- drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c index eb347ed265f2adfa..1c144b21869df39c 100644 --- a/drivers/clk/renesas/r8a7796-cpg-mssr.c +++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -190,7 +191,12 @@ enum clk_ids { 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) { -- 1.9.1