From patchwork Sat Mar 5 15:42:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vishnupatekar X-Patchwork-Id: 8510731 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 0130A9F2F0 for ; Sat, 5 Mar 2016 15:45:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2BC57201EF for ; Sat, 5 Mar 2016 15:45:54 +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 49036201CD for ; Sat, 5 Mar 2016 15:45:53 +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 1acENO-0003Yi-3C; Sat, 05 Mar 2016 15:44:18 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1acEN6-0003Nn-Sj for linux-arm-kernel@lists.infradead.org; Sat, 05 Mar 2016 15:44:02 +0000 Received: by mail-pf0-x242.google.com with SMTP id 184so5056808pff.1 for ; Sat, 05 Mar 2016 07:43:40 -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=AhtDjYQYqrteu4DXSmH/9vsNaHBUm7pg+COAfg3eTkHvg6e+iQWFTWzW248ZcZiKg2 ddBxBtqwthSKsaioiCRWKlVBkwmjAy+QMXiVOnfAQlVdMVXm7J0DAiGoXgstWTO9C/yD iV1BAJsbzidWunO9p9zpUEcMo/JXuoE/nOvEnu1TPkeRTOsUoT8KiHFivTfYiI56p9v6 fWjn+NHTGZuBvq+meL/+dxoD9pS0ev8VKU4M/XEAu1PPuJpPlG+zx5yfUCZXc867hD+s TSrIRl2NHQYK5wZh0HUBQFM2iCuDz7d+WHORO6xMdHzkzpEJzb9u5YiWDsa7bS3emhzM qZDw== 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=WFewqUsAqE0BCJkLsmOuTisSIsefl6pOMdaK3N6fsrLqqOuvO5HoqXnP1FKz9e8Rrd 7cZEM7W9pEcsthhU9SmAAW1XhNKL2ryE5eNLoW6RJzj5a6VcMeuIepMr0IhoMpOru18H DuUmJJ1J8amK3eWnwmbrsB7FOVsK36pv/yP1BdrnqRTnDGJhdV1Y2RCxpUVamrAkpLBy 3Jx0h4nLzv7tyuwwq+vXgq3eIFQV0V3DlYGWzNK+msKCf/q/rnZYKGhjnUmP7V/suUpZ lJJUJhnFiEUUPNLLovduVcy5Nds8LwTgGL07cGWm0K3DhQA/F4ptXSzrebHpreOQb5XE V3mQ== X-Gm-Message-State: AD7BkJLDCo5JcWbci1Ai30L3t4lrVHn2DP+p7oKxTQrwle2Hu1lX+4fzuB1cYOOEiny2Ug== X-Received: by 10.98.12.154 with SMTP id 26mr20894089pfm.20.1457192620198; Sat, 05 Mar 2016 07:43:40 -0800 (PST) Received: from localhost.localdomain ([101.127.161.160]) by smtp.gmail.com with ESMTPSA id ah10sm13230527pad.23.2016.03.05.07.43.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 Mar 2016 07:43:39 -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 v3 03/13] clk: sunxi: Add APB1 clock for A83T Date: Sat, 5 Mar 2016 23:42:56 +0800 Message-Id: <1457192586-25596-4-git-send-email-vishnupatekar0510@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457192586-25596-1-git-send-email-vishnupatekar0510@gmail.com> References: <1457192586-25596-1-git-send-email-vishnupatekar0510@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160305_074401_058928_D53BD9D3 X-CRM114-Status: GOOD ( 10.85 ) 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);