From patchwork Mon Feb 1 17:39:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 8182301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 41D099F4DD for ; Mon, 1 Feb 2016 17:43:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C5332028D for ; Mon, 1 Feb 2016 17:43:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 896A0202AE for ; Mon, 1 Feb 2016 17:43:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQIUB-0005iT-KS; Mon, 01 Feb 2016 17:41:59 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQISk-0004N8-P7 for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2016 17:40:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6F485F0; Mon, 1 Feb 2016 09:39:22 -0800 (PST) Received: from e104803-lin.lan (unknown [10.1.203.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9AE1E3F246; Mon, 1 Feb 2016 09:40:03 -0800 (PST) From: Andre Przywara To: Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com Subject: [PATCH 07/11] clk: sunxi: add generic allwinner,sunxi name Date: Mon, 1 Feb 2016 17:39:26 +0000 Message-Id: <1454348370-3816-8-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1454348370-3816-1-git-send-email-andre.przywara@arm.com> References: <1454348370-3816-1-git-send-email-andre.przywara@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_094031_196704_E191748B X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -7.4 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Arnd Bergmann , Ian Campbell , =?UTF-8?q?Emilio=20L=C3=B3pez?= , Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org, Rob Herring , Jens Kuske , Kumar Gala , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The only difference between the different compatible matches at the end of clk-sunxi.c are the critical clocks. Two SoCs get away so far without any, so there is no reason to enumerate those SoCs in here explicitly, though we have to keep them in for compatibility reasons. Rename the init function to highlight this generic feature and add a new, generic DT compatible string which can be used as a fallback value in the future should a particular SoC don't need any special treatment. Signed-off-by: Andre Przywara --- Documentation/devicetree/bindings/arm/sunxi.txt | 4 ++++ drivers/clk/sunxi/clk-sunxi.c | 14 ++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/sunxi.txt b/Documentation/devicetree/bindings/arm/sunxi.txt index 7e79fcc..980e065 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.txt +++ b/Documentation/devicetree/bindings/arm/sunxi.txt @@ -14,3 +14,7 @@ using one of the following compatible strings: allwinner,sun8i-a83t allwinner,sun8i-h3 allwinner,sun9i-a80 + +For Allwinner SoCs without any specific needs the generic fallback value of: + allwinner,sunxi +can be used. diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index e460a6b..efcce85 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -1052,14 +1052,12 @@ CLK_OF_DECLARE(sun8i_a23_clk_init, "allwinner,sun8i-a23", sun6i_init_clocks); CLK_OF_DECLARE(sun8i_a33_clk_init, "allwinner,sun8i-a33", sun6i_init_clocks); CLK_OF_DECLARE(sun8i_h3_clk_init, "allwinner,sun8i-h3", sun6i_init_clocks); -static void __init sun8i_a83t_init_clocks(struct device_node *node) +static void __init sunxi_generic_init_clocks(struct device_node *node) { sunxi_init_clocks(NULL, 0); } -CLK_OF_DECLARE(sun8i_a83t_clk_init, "allwinner,sun8i-a83t", sun8i_a83t_init_clocks); - -static void __init sun9i_init_clocks(struct device_node *node) -{ - sunxi_init_clocks(NULL, 0); -} -CLK_OF_DECLARE(sun9i_a80_clk_init, "allwinner,sun9i-a80", sun9i_init_clocks); +CLK_OF_DECLARE(sun8i_a83t_clk_init, "allwinner,sun8i-a83t", + sunxi_generic_init_clocks); +CLK_OF_DECLARE(sun9i_a80_clk_init, "allwinner,sun9i-a80", + sunxi_generic_init_clocks); +CLK_OF_DECLARE(sunxi_clk_init, "allwinner,sunxi", sunxi_generic_init_clocks);