From patchwork Sun Feb 28 15:18:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vishnupatekar X-Patchwork-Id: 8447081 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 ADA319F2F0 for ; Sun, 28 Feb 2016 15:21:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1E66201FE for ; Sun, 28 Feb 2016 15:21:43 +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 F05EF201C8 for ; Sun, 28 Feb 2016 15:21:42 +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 1aa38p-0007ZH-KC; Sun, 28 Feb 2016 15:20:15 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aa38P-0006qA-El for linux-arm-kernel@lists.infradead.org; Sun, 28 Feb 2016 15:19:50 +0000 Received: by mail-pa0-x244.google.com with SMTP id a7so5889280pax.3 for ; Sun, 28 Feb 2016 07:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QeNjYVKOBbrravcZUklcTOh1h1jgpLzVSdb619k1DLM=; b=hUV8gtRiMC/K/SK0knhQD9bDLqTB9PHz02qxhnbbaeRZgG/i9USL31LUXiXgCr2Mf8 HKkUz/7Y+yyidIu32tByy4S+Poqs0RMhlfKDkU/x5LMk6Coq8H4lhx+YVZ57ma3TMi76 AgMvetRRkQI3WpS000Fu8gYhju2GE/HTAavu6vUnV+KuSBBbNkKk0pz6B9hjrEzs/+Ki hPQEUvAaevcaogQQJqapwdbdfQ/KPk4Pt/i3FoTj34sbn01SzAck8EGwfMQAqkxXCuq3 MR7D1Qt7ToCdxlH0hVpj7hkOUgzzvTkEojyFq/h+8OBaip21UKQ05ASTGNio5vG0Ss1H gVWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QeNjYVKOBbrravcZUklcTOh1h1jgpLzVSdb619k1DLM=; b=jLLPEdvDvVSIHXC9YlFmoe2Z1Ix4jnAuIopkb25BnyvVB65kSo/KoRT60dVpT/ruQ8 NIGkGI21xhV6dOFCFlbkdSYCxe4At0u4EGCHvncTvpqHACiubujtvCps7NXU/Xnom8e5 i3Xzf/eJ+ir66qzz8vwT8RKb5zk8iwIVgtTR64+51LgaNhXHG+ml3q7gM7oMsfdn4GBD ClM25M1RRO8dhMfFTkqq3IT8+x19/KsHs01yg5dE/7HgYgxwcd1Ua7t6BaeZ4RdTzwxq QL16SHZk79Dn1Rok7Jklp9T5RWmr7rY7swg+++sJueS//DjvT/Ivt176D6N8ScEqrGvL ydpA== X-Gm-Message-State: AD7BkJLWaCT3hoRfiIUBKbuEbVtDDvcUc0VIRqrXqq8saJQSuQ3EygWVzPskxJ2u9ZsbKw== X-Received: by 10.67.3.67 with SMTP id bu3mr15785625pad.39.1456672768810; Sun, 28 Feb 2016 07:19:28 -0800 (PST) Received: from localhost.localdomain ([101.127.161.160]) by smtp.gmail.com with ESMTPSA id 70sm31902824pfs.78.2016.02.28.07.19.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Feb 2016 07:19:28 -0800 (PST) From: Vishnu Patekar To: robh+dt@kernel.org, corbet@lwn.net, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, maxime.ripard@free-electrons.com, linux@arm.linux.org.uk, emilio@elopez.com.ar Subject: [PATCH v2 03/13] clk: sunxi: Add APB1 clock for A83T Date: Sun, 28 Feb 2016 23:18:48 +0800 Message-Id: <1456672738-4993-4-git-send-email-vishnupatekar0510@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456672738-4993-1-git-send-email-vishnupatekar0510@gmail.com> References: <1456672738-4993-1-git-send-email-vishnupatekar0510@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160228_071949_669118_3A229614 X-CRM114-Status: GOOD ( 11.03 ) X-Spam-Score: -2.5 (--) 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: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-sunxi@googlegroups.com, patchesrdh@mveas.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, hdegoede@redhat.com, wens@csie.org, mturquette@baylibre.com, jenskuske@gmail.com, linus.walleij@linaro.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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 APB1 is similar to sun4i-a10-apb0-clk, except different dividers. This adds support for apb1 on A83T. Signed-off-by: Vishnu Patekar Acked-by: Rob Herring --- Documentation/devicetree/bindings/clock/sunxi.txt | 1 + drivers/clk/sunxi/clk-sunxi.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 2ee7841..dd24772 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt @@ -49,6 +49,7 @@ Required properties: "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock + "allwinner,sun8i-a83t-apb1-clk" - for the APB1 clock on A83T "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80 "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13 diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index 0ae1f09..987a12d 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -863,6 +863,12 @@ static const struct div_data sun4i_apb0_data __initconst = { .table = sun4i_apb0_table, }; +static const struct div_data sun8i_a83t_apb1_data __initconst = { + .shift = 8, + .pow = 0, + .width = 2, +}; + static void __init sunxi_divider_clk_setup(struct device_node *node, const struct div_data *data) { @@ -899,6 +905,13 @@ static void __init sun4i_apb0_clk_setup(struct device_node *node) CLK_OF_DECLARE(sun4i_apb0, "allwinner,sun4i-a10-apb0-clk", sun4i_apb0_clk_setup); +static void __init sun8i_a83t_apb1_clk_setup(struct device_node *node) +{ + sunxi_divider_clk_setup(node, &sun8i_a83t_apb1_data); +} +CLK_OF_DECLARE(sun8i_a83t_apb1, "allwinner,sun8i-a83t-apb1-clk", + sun8i_a83t_apb1_clk_setup); + static void __init sun4i_axi_clk_setup(struct device_node *node) { sunxi_divider_clk_setup(node, &sun4i_axi_data);