From patchwork Tue Apr 10 12:51:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10333067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B91D56053C for ; Tue, 10 Apr 2018 12:55:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A951E28A4E for ; Tue, 10 Apr 2018 12:55:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BFB128CF0; Tue, 10 Apr 2018 12:55:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3EAC28A4E for ; Tue, 10 Apr 2018 12:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GXEa+toSGzxjGGZqdDSwf+in8mg8rrjsEZ8lJU4eN4g=; b=NdRzxiR2gZH29+00J++ZN3fYBc PVLcscmVfo8kuTbfLuICcOEAvTEdN52NdvRoA9tNzPrGgsm7SPdM1mx6Q9oqR1Ii3YUrSutGHNoxA MGiLrM3BdXmQ8gaNZk4MKc1f04ZKjBwJSrJ98zzoXfWbFJFKg8/Wi3n+LWSI+5rUUJXjO5HhUaqLz tREcLyrl6CDOsGqJDIOENEJLVHs6aDIYC4Omk5Zjn6dN602wdN9jcZOGE66bOxicFdnnbovcaNlPX mHGf+7vaOhz5JOas4JMiDJtn7g3tYprhCz8G2QeIUOncw4ugRQTxvz7yqIkH9rY9ZWTQFNta78+wW 7dCSHZtA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5soL-0006KG-Gz; Tue, 10 Apr 2018 12:55:45 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f5sl0-00034D-Ab for linux-rockchip@lists.infradead.org; Tue, 10 Apr 2018 12:52:20 +0000 Received: from ayla.of.borg ([84.194.111.163]) by baptiste.telenet-ops.be with bizsmtp id Ycrj1x00V3XaVaC01crj7Q; Tue, 10 Apr 2018 14:52:00 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1f5skR-00054P-Ny; Tue, 10 Apr 2018 14:51:43 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1f5skR-000414-N1; Tue, 10 Apr 2018 14:51:43 +0200 From: Geert Uytterhoeven To: Michael Turquette , Stephen Boyd Subject: [PATCH v2 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding Date: Tue, 10 Apr 2018 14:51:38 +0200 Message-Id: <1523364701-15383-3-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523364701-15383-1-git-send-email-geert+renesas@glider.be> References: <1523364701-15383-1-git-send-email-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180410_055218_560167_CB5108C0 X-CRM114-Status: GOOD ( 13.78 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Heiko Stuebner , Geert Uytterhoeven , linux-rockchip@lists.infradead.org, Maxime Ripard , Linus Walleij , Daniel Lezcano , linux-kernel@vger.kernel.org, Jonathan Hunter , linux-gpio@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Thierry Reding , linux-tegra@vger.kernel.org, Thomas Gleixner , Frank Rowand , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Geert Uytterhoeven Acked-by: Daniel Lezcano Reviewed-by: Linus Walleij --- This depends on "[PATCH v2 1/5] clk: Extract OF clock helpers in ". v2: - of_clk_get_parent_count() was moved to , - Dropped RFC, as a dummy is now available in the !CONFIG_COMMON_CLK case. --- drivers/clocksource/timer-sp804.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/timer-sp804.c b/drivers/clocksource/timer-sp804.c index 3ac9dec9a03852f9..e01222ea888ff9d2 100644 --- a/drivers/clocksource/timer-sp804.c +++ b/drivers/clocksource/timer-sp804.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -245,7 +246,7 @@ static int __init sp804_of_init(struct device_node *np) clk1 = NULL; /* Get the 2nd clock if the timer has 3 timer clocks */ - if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) { + if (of_clk_get_parent_count(np) == 3) { clk2 = of_clk_get(np, 1); if (IS_ERR(clk2)) { pr_err("sp804: %s clock not found: %d\n", np->name,