From patchwork Thu Mar 13 19:38:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 3828161 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C3AFC9F2BB for ; Thu, 13 Mar 2014 19:40:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01E54201F4 for ; Thu, 13 Mar 2014 19:40:01 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E302201C7 for ; Thu, 13 Mar 2014 19:39:59 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOBTw-00007e-08; Thu, 13 Mar 2014 19:39:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOBTt-0004pK-5J; Thu, 13 Mar 2014 19:39:53 +0000 Received: from mail-yh0-f48.google.com ([209.85.213.48]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOBTp-0004nR-LL for linux-arm-kernel@lists.infradead.org; Thu, 13 Mar 2014 19:39:50 +0000 Received: by mail-yh0-f48.google.com with SMTP id z6so1541652yhz.21 for ; Thu, 13 Mar 2014 12:39:24 -0700 (PDT) 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=vEbt5HJ3vWiGTac7xPS+16V8eGyyK26rD3CON/ooQko=; b=FrWgIawjeS5tcBChnetyhP2UCKM9kZ5b3u4QgZe7TyC3lnV0TeGgwlx7l9klDmbllB VaoZV9bM3BSGKx6Xbgy0PvZALBJDHMT8ocjSSy4/xqM+1wr8klc/VfywUNJwFRtQ3GM1 cGpgIHHD5zYW5/PogaDWXY3hNZWkchmF1fIk/z5fVwcz+e/OJ2lWNpg4tOSMwrDW5zx0 9A4OWE6/VF2fBOz3pa3zbcV6+hcsIpXNZYo57Aonol+/8OPf6DlHnPyUdJ8Ud79KgM3+ IEuCH/g2jlRMULdZvkem2BC965pZunQE3JmnCkNUxdYuvbtHgZda4B0wgTrwV2edHIeu DpIw== X-Gm-Message-State: ALoCoQnynzftEv6CzkGjxt3644r72BbCdnKz6r442AD5X3MOdgthzlieg8H2hr+JF0BBj4ZbDukB X-Received: by 10.236.86.180 with SMTP id w40mr5072520yhe.116.1394739564914; Thu, 13 Mar 2014 12:39:24 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.104]) by mx.google.com with ESMTPSA id t58sm8806635yho.20.2014.03.13.12.39.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Mar 2014 12:39:24 -0700 (PDT) From: Ezequiel Garcia To: Mike Turquette , Jason Cooper , , , Subject: [PATCH v2 1/6] clk: mvebu: Support Armada 380 SoC on the core divider clock Date: Thu, 13 Mar 2014 16:38:57 -0300 Message-Id: <1394739542-30017-2-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394739542-30017-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1394739542-30017-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140313_153949_735564_C8DE05BA X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: Lior Amsalem , Thomas Petazzoni , sergei.shtylyov@cogentembedded.com, Tawfik Bayouk , Andrew Lunn , Seif Mazareeb , Ezequiel Garcia , Gregory Clement , Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 From: Ezequiel Garcia This commit adds support for the Core Divider clocks of the Armada 380 SoCs. Similarly to Armada 370 and XP, the Core Divider clocks of the 380 have gate capabilities. The only difference is the register layout. Signed-off-by: Ezequiel Garcia --- drivers/clk/mvebu/clk-corediv.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/clk/mvebu/clk-corediv.c b/drivers/clk/mvebu/clk-corediv.c index 4da6076..911dbb6 100644 --- a/drivers/clk/mvebu/clk-corediv.c +++ b/drivers/clk/mvebu/clk-corediv.c @@ -204,6 +204,22 @@ static const struct clk_corediv_soc_desc armada370_corediv_soc = { .ratio_offset = 0x8, }; +static const struct clk_corediv_soc_desc armada380_corediv_soc = { + .descs = mvebu_corediv_desc, + .ndescs = ARRAY_SIZE(mvebu_corediv_desc), + .ops = { + .enable = clk_corediv_enable, + .disable = clk_corediv_disable, + .is_enabled = clk_corediv_is_enabled, + .recalc_rate = clk_corediv_recalc_rate, + .round_rate = clk_corediv_round_rate, + .set_rate = clk_corediv_set_rate, + }, + .ratio_reload = BIT(8), + .enable_bit_offset = 16, + .ratio_offset = 0x4, +}; + static const struct clk_corediv_soc_desc armada375_corediv_soc = { .descs = mvebu_corediv_desc, .ndescs = ARRAY_SIZE(mvebu_corediv_desc), @@ -290,3 +306,10 @@ static void __init armada375_corediv_clk_init(struct device_node *node) } CLK_OF_DECLARE(armada375_corediv_clk, "marvell,armada-375-corediv-clock", armada375_corediv_clk_init); + +static void __init armada380_corediv_clk_init(struct device_node *node) +{ + return mvebu_corediv_clk_init(node, &armada380_corediv_soc); +} +CLK_OF_DECLARE(armada380_corediv_clk, "marvell,armada-380-corediv-clock", + armada380_corediv_clk_init);