From patchwork Tue Jun 23 14:09:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Fernandez X-Patchwork-Id: 50233 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 24375216E1 for ; Tue, 23 Jun 2015 14:11:26 +0000 (UTC) Received: by laar3 with SMTP id r3sf3283709laa.1 for ; Tue, 23 Jun 2015 07:11:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=kSAPCnjoSyn1zeI6WJDELlXoTtBuHe5os+helFKxp9U=; b=PbsTaKt/7H4cJN6RMjB5UuAXZ4riTZLnSuvB0P7KZbJJiiqQNaGPtJnAeOzUyez095 6rqsc+F3yiFOniWzNjTgoyMjue3AZOEDSxiWv7V0FckcPcu0Wk8nM+v8DaDRkP1iEXGz prGllfSo8mgxQlbLYHdvoD8vyfgxzMLOs9XCsT9PIG6h0Pz7BujMxwUhPihWs33pp4iD fqVzfQUnhR9hLMiLWv4Md+PnbPy85YLhfI0GVAvpSPpEGAOHQRXAkhw/K8wFquOLXI+W ixyziUdUgcDCYDRGBJMQqJQSCeL2uWdl/EYN4qPJcO+tZl0wJzqpwBLkpflBJP9SuATj mn6w== X-Gm-Message-State: ALoCoQmg0T9n25o8BtL2YLsd1BO8tLjgCjxNYMjoWF0D76eeNFSHkVUHq+8Drc89XBKRLO7UA4Xe X-Received: by 10.180.35.162 with SMTP id i2mr1478895wij.6.1435068685097; Tue, 23 Jun 2015 07:11:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.195 with SMTP id o3ls56675laf.1.gmail; Tue, 23 Jun 2015 07:11:24 -0700 (PDT) X-Received: by 10.112.53.226 with SMTP id e2mr27085291lbp.124.1435068684898; Tue, 23 Jun 2015 07:11:24 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id pu2si19417582lbb.69.2015.06.23.07.11.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 07:11:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbnk3 with SMTP id k3so7545048lbn.1 for ; Tue, 23 Jun 2015 07:11:24 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr34835969lag.112.1435068684665; Tue, 23 Jun 2015 07:11:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3103682lbb; Tue, 23 Jun 2015 07:11:23 -0700 (PDT) X-Received: by 10.70.135.195 with SMTP id pu3mr70381375pdb.0.1435068682618; Tue, 23 Jun 2015 07:11:22 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gu1si34762581pbd.210.2015.06.23.07.11.21; Tue, 23 Jun 2015 07:11:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933434AbbFWOLO (ORCPT + 7 others); Tue, 23 Jun 2015 10:11:14 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:36640 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933387AbbFWOKX (ORCPT ); Tue, 23 Jun 2015 10:10:23 -0400 Received: by wguu7 with SMTP id u7so10787344wgu.3 for ; Tue, 23 Jun 2015 07:10:21 -0700 (PDT) X-Received: by 10.180.88.8 with SMTP id bc8mr3792487wib.19.1435068620708; Tue, 23 Jun 2015 07:10:20 -0700 (PDT) Received: from lmenx315.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id lk5sm22556790wic.24.2015.06.23.07.10.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 07:10:20 -0700 (PDT) From: Gabriel Fernandez To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard , Russell King , Michael Turquette , Stephen Boyd , Gabriel Fernandez , Peter Griffin , Pankaj Dev , Olivier Bideau , Javier Martinez Canillas , Geert Uytterhoeven , Fabian Frederick Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-clk@vger.kernel.org Subject: [PATCH 6/9] drivers: clk: st: Add CLK_GET_RATE_NOCACHE flag to clocks Date: Tue, 23 Jun 2015 16:09:24 +0200 Message-Id: <1435068567-30995-7-git-send-email-gabriel.fernandez@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435068567-30995-1-git-send-email-gabriel.fernandez@linaro.org> References: <1435068567-30995-1-git-send-email-gabriel.fernandez@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: gabriel.fernandez@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Pankaj Dev Add the CLK_GET_RATE_NOCACHE flag to all the clocks with recalc ops, so that they reflect Hw rate after CPS wake-up when a clk_get_rate() is called Signed-off-by: Pankaj Dev Signed-off-by: Gabriel Fernandez --- drivers/clk/st/clk-flexgen.c | 2 +- drivers/clk/st/clkgen-fsyn.c | 2 +- drivers/clk/st/clkgen-mux.c | 8 +++++--- drivers/clk/st/clkgen-pll.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c index be06d2a..8dd8cce 100644 --- a/drivers/clk/st/clk-flexgen.c +++ b/drivers/clk/st/clk-flexgen.c @@ -190,7 +190,7 @@ static struct clk *clk_register_flexgen(const char *name, init.name = name; init.ops = &flexgen_ops; - init.flags = CLK_IS_BASIC | flexgen_flags; + init.flags = CLK_IS_BASIC | CLK_GET_RATE_NOCACHE | flexgen_flags; init.parent_names = parent_names; init.num_parents = num_parents; diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c index 9e26099..d9eb2e1 100644 --- a/drivers/clk/st/clkgen-fsyn.c +++ b/drivers/clk/st/clkgen-fsyn.c @@ -635,7 +635,7 @@ static struct clk * __init st_clk_register_quadfs_pll( init.name = name; init.ops = quadfs->pll_ops; - init.flags = CLK_IS_BASIC; + init.flags = CLK_IS_BASIC | CLK_GET_RATE_NOCACHE; init.parent_names = &parent_name; init.num_parents = 1; diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c index c94b56b..3919a67 100644 --- a/drivers/clk/st/clkgen-mux.c +++ b/drivers/clk/st/clkgen-mux.c @@ -239,7 +239,7 @@ static struct clk *clk_register_genamux(const char *name, init.name = name; init.ops = &clkgena_divmux_ops; - init.flags = CLK_IS_BASIC; + init.flags = CLK_IS_BASIC | CLK_GET_RATE_NOCACHE; init.parent_names = parent_names; init.num_parents = num_parents; @@ -516,7 +516,8 @@ static void __init st_of_clkgena_prediv_setup(struct device_node *np) 0, &clk_name)) return; - clk = clk_register_divider_table(NULL, clk_name, parent_name, 0, + clk = clk_register_divider_table(NULL, clk_name, parent_name, + CLK_GET_RATE_NOCACHE, reg + data->offset, data->shift, 1, 0, data->table, NULL); if (IS_ERR(clk)) @@ -789,7 +790,8 @@ static void __init st_of_clkgen_vcc_setup(struct device_node *np) &mux->hw, &clk_mux_ops, &div->hw, &clk_divider_ops, &gate->hw, &clk_gate_ops, - data->clk_flags); + data->clk_flags | + CLK_GET_RATE_NOCACHE); if (IS_ERR(clk)) { kfree(gate); kfree(div); diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c index 1065322..72d1c27 100644 --- a/drivers/clk/st/clkgen-pll.c +++ b/drivers/clk/st/clkgen-pll.c @@ -406,7 +406,7 @@ static struct clk * __init clkgen_pll_register(const char *parent_name, init.name = clk_name; init.ops = pll_data->ops; - init.flags = CLK_IS_BASIC; + init.flags = CLK_IS_BASIC | CLK_GET_RATE_NOCACHE; init.parent_names = &parent_name; init.num_parents = 1;