From patchwork Thu Oct 1 19:47:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7311131 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 A279B9F302 for ; Thu, 1 Oct 2015 19:50:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2D10207A6 for ; Thu, 1 Oct 2015 19:50:25 +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 EA43E207A9 for ; Thu, 1 Oct 2015 19:50: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 1Zhjpu-0004a6-2p; Thu, 01 Oct 2015 19:48:14 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zhjpq-0004ST-6j for linux-arm-kernel@lists.infradead.org; Thu, 01 Oct 2015 19:48:11 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id B7032141951; Thu, 1 Oct 2015 19:47:49 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id A15C1141953; Thu, 1 Oct 2015 19:47:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: 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 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D7EB7141951; Thu, 1 Oct 2015 19:47:48 +0000 (UTC) Date: Thu, 1 Oct 2015 12:47:48 -0700 From: Stephen Boyd To: Michael Turquette Subject: Re: [PULL] clk: at91: sama5d2 materials Message-ID: <20151001194747.GK19319@codeaurora.org> References: <20150818102401.17de779b@bbrezillon> <20150825191033.31346.67237@quantum> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150825191033.31346.67237@quantum> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151001_124810_444090_D219AAEC X-CRM114-Status: GOOD ( 24.31 ) X-Spam-Score: -2.6 (--) 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: Boris Brezillon , Nicolas Ferre , Alexandre Belloni , Jean-Christophe Plagniol-Villard , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 08/25, Michael Turquette wrote: > Quoting Boris Brezillon (2015-08-18 01:24:01) > > Stephen, Mike, > > > > Here is a PR for the sama5d2 materials. > > I know we're already late in the release cycle and I'm not sure you can > > take this PR into account for 4.3, so if you can't could you please > > queue it for 4.4? > > Queued for 4.4. > > Thanks, > Mike > > > > > Thanks, > > > > Boris > > > > The following changes since commit c42743f11f58646a50bc4b96da363429dca0c5e6: > > This commit was in clk-next and then got rebased. clk-next isn't stable, please don't base pull requests on it. If you have some dependency on the patches in there then we need to know so that we can provide some branch. I cherry-picked the 4 patches to clk-next. I had to squash in this fix to get it to compile. Please check. ---8<---- Tested-by: Nicolas Ferre diff --git a/drivers/clk/at91/clk-generated.c b/drivers/clk/at91/clk-generated.c index 631123ca6f85..abc80949e1dd 100644 --- a/drivers/clk/at91/clk-generated.c +++ b/drivers/clk/at91/clk-generated.c @@ -99,22 +99,22 @@ static int clk_generated_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { struct clk_generated *gck = to_clk_generated(hw); - struct clk *parent = NULL; + struct clk_hw *parent = NULL; long best_rate = -EINVAL; unsigned long tmp_rate, min_rate; int best_diff = -1; int tmp_diff; int i; - for (i = 0; i < __clk_get_num_parents(hw->clk); i++) { + for (i = 0; i < clk_hw_get_num_parents(hw); i++) { u32 div; unsigned long parent_rate; - parent = clk_get_parent_by_index(hw->clk, i); + parent = clk_hw_get_parent_by_index(hw, i); if (!parent) continue; - parent_rate = __clk_get_rate(parent); + parent_rate = clk_hw_get_rate(parent); min_rate = DIV_ROUND_CLOSEST(parent_rate, GENERATED_MAX_DIV + 1); if (!parent_rate || (gck->range.max && min_rate > gck->range.max)) @@ -128,7 +128,7 @@ static int clk_generated_determine_rate(struct clk_hw *hw, best_rate = tmp_rate; best_diff = tmp_diff; req->best_parent_rate = parent_rate; - req->best_parent_hw = __clk_get_hw(parent); + req->best_parent_hw = parent; } if (!best_diff || tmp_rate < req->rate) @@ -156,7 +156,7 @@ static int clk_generated_set_parent(struct clk_hw *hw, u8 index) { struct clk_generated *gck = to_clk_generated(hw); - if (index >= __clk_get_num_parents(hw->clk)) + if (index >= clk_hw_get_num_parents(hw)) return -EINVAL; gck->parent_id = index;