From patchwork Wed Mar 16 16:04:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vishnupatekar X-Patchwork-Id: 8602141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 98355C0553 for ; Wed, 16 Mar 2016 16:16:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DDF3202F0 for ; Wed, 16 Mar 2016 16:16:26 +0000 (UTC) Received: from bombadil.infradead.org (unknown [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 87C7920172 for ; Wed, 16 Mar 2016 16:16:24 +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 1agDyC-0005e8-BX; Wed, 16 Mar 2016 16:06:48 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1agDxo-0005Uv-8G for linux-arm-kernel@lists.infradead.org; Wed, 16 Mar 2016 16:06:25 +0000 Received: by mail-pf0-x244.google.com with SMTP id q129so7258574pfb.3 for ; Wed, 16 Mar 2016 09:06:08 -0700 (PDT) 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=D6jvlps0YiNeryknLwgko5qVju39NdRm1cC7fMXMPek=; b=lFZYREvQXqqNxn41ilnUrleXUQakAsNjUxMjrsZ1+wAVuQOwY90u9MpakiR5h+cIxf o0u3c2ZgBJjfxlkbGUd4G7Pm/fRKZWkHS+R4wgdAXnpX3H7e41zDmkv2zdfmDN8L1ViR 3C468oytGnZYUYJNF7sHMXTlOxfSFWUDo5kzfkDO+edCgTkSrwau8Wsrnn3JWaHAvj+z 31Ya/4a7CqHTWegdeA0GrludXTklrJVg+srnElJrjWy3LGStN4Zs3G+NfQ9FbFdEumCX /L4bdqBjtImrVoPHsi18U5ZuxWh1UTV+WB2Fbq5nidXBd9AmPNiyzYPJvbztH1Wm3EGz 9rig== 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=D6jvlps0YiNeryknLwgko5qVju39NdRm1cC7fMXMPek=; b=U5aAv9sQsg1KWZ0OQTQW+SjL1ldJrwcpattUs3mpnhO2ZrcDp5C+9a5OkmZRPwCELG eD5vUfqu8cVsN1FL+kUAyIGyTIlWV8WfO6iMc61W/neM2y/LhArBgo/g4/lb5V/1LxuL 8XsoDyccnchMZnGS5dmE483Wi1P2cwGge4z42UOmclS3Wchb3WE4Ui0XihXzTnbVBV/N mt5JgmK30bdOr4KN7A5e/oYPxIWtEcLHtG5KvnXFMdrOxrvu4Ropk0pab0CA+WBRqyWA YFvnJuXNToRb+wYAMyQgdArQdsvxxKYVaHWywJbBImnXRtD2x5ounzt8Zc2u8QWuzmDS 9vew== X-Gm-Message-State: AD7BkJJRLo2gQwfUsMmkfh0VZrzV+8VeRMn1I7pweZIMan9rukHzPwzhJx8UHpG/F/sjTg== X-Received: by 10.66.253.68 with SMTP id zy4mr7131946pac.81.1458144368572; Wed, 16 Mar 2016 09:06:08 -0700 (PDT) Received: from localhost.localdomain ([101.127.161.160]) by smtp.gmail.com with ESMTPSA id by3sm6693400pab.39.2016.03.16.09.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Mar 2016 09:06:07 -0700 (PDT) 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 v4 03/13] clk: sunxi: Add APB1 clock for A83T Date: Thu, 17 Mar 2016 00:04:26 +0800 Message-Id: <1458144276-31108-4-git-send-email-vishnupatekar0510@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458144276-31108-1-git-send-email-vishnupatekar0510@gmail.com> References: <1458144276-31108-1-git-send-email-vishnupatekar0510@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160316_090624_463568_6D487CFB X-CRM114-Status: GOOD ( 11.12 ) 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=-3.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RDNS_NONE, 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 cba9fe55..291d366 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt @@ -51,6 +51,7 @@ Required properties: "allwinner,sun8i-h3-apb0-gates-clk" - for the APB0 gates on H3 "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 a7aab65..171282d 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -872,6 +872,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) { @@ -938,6 +944,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);