From patchwork Tue Jun 23 14:09:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Fernandez X-Patchwork-Id: 50229 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 21AA9216E1 for ; Tue, 23 Jun 2015 14:10:32 +0000 (UTC) Received: by wgbhy7 with SMTP id hy7sf3263446wgb.3 for ; Tue, 23 Jun 2015 07:10:31 -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=xuKxL9itulKhjj46GvzIjrvlkqAsL6R+zjyAcORchzg=; b=VHFtVTfG38upm7CVkIRg7JySb7UKS/voQoeS0BispqY53doNqls9o4+L1PSJX3YuPm tvRQl1eYtpJEiDozgUCvSqSMggfnLrwSecIB9sZu38GPHhgNjriFqzM/Bz5Ebrc1PMoq gLvW7pZteNo7Ch7L2DvHhLjUeylUh2k+PcVYsaRs0AKhnJdHjZjjvRMFoaNCxTy8H+C8 SkWdXyHXe3eYPMP10dZKWrut3tx5uqNxFLGPWqHCM8zeMxbuhqTV0ibF9WqZblqZVlD0 vE2ZX7dCFnhSRfUmMdMmKOqPG4zb4sbfGW46BZ2nBOMzFCD9+NsfXKQSwF2WqFSS7NFh zJmQ== X-Gm-Message-State: ALoCoQnCL37g4TsqgHQ33ETOn8hD4a79nBMAIW+J/I3jTp3YMUvIKJHn7nPcoviB53Co3Ok09kTp X-Received: by 10.180.35.162 with SMTP id i2mr1476497wij.6.1435068631458; Tue, 23 Jun 2015 07:10:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.200 with SMTP id c8ls56064lab.81.gmail; Tue, 23 Jun 2015 07:10:31 -0700 (PDT) X-Received: by 10.152.18.163 with SMTP id x3mr35193026lad.70.1435068631293; Tue, 23 Jun 2015 07:10:31 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id w5si19406172laj.65.2015.06.23.07.10.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 07:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbvz5 with SMTP id vz5so7536581lbb.0 for ; Tue, 23 Jun 2015 07:10:31 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr7897269laj.19.1435068631149; Tue, 23 Jun 2015 07:10:31 -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 hn6csp3103109lbb; Tue, 23 Jun 2015 07:10:29 -0700 (PDT) X-Received: by 10.70.131.4 with SMTP id oi4mr908346pdb.95.1435068629162; Tue, 23 Jun 2015 07:10:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cr2si34890770pdb.74.2015.06.23.07.10.28; Tue, 23 Jun 2015 07:10:29 -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 S933574AbbFWOK0 (ORCPT + 7 others); Tue, 23 Jun 2015 10:10:26 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35368 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933257AbbFWOKS (ORCPT ); Tue, 23 Jun 2015 10:10:18 -0400 Received: by wiga1 with SMTP id a1so107639730wig.0 for ; Tue, 23 Jun 2015 07:10:16 -0700 (PDT) X-Received: by 10.194.77.97 with SMTP id r1mr62709259wjw.132.1435068616715; Tue, 23 Jun 2015 07:10:16 -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.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 07:10:16 -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 4/9] drivers: clk: st: Fix FSYN channel values Date: Tue, 23 Jun 2015 16:09:22 +0200 Message-Id: <1435068567-30995-5-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.176 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: , This patch fixes the value for disabling the FSYN channel clock. The 'is_enabled' returned value is also fixed. Signed-off-by: Pankaj Dev Signed-off-by: Gabriel Fernandez --- drivers/clk/st/clkgen-fsyn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c index e7e6782..9e26099 100644 --- a/drivers/clk/st/clkgen-fsyn.c +++ b/drivers/clk/st/clkgen-fsyn.c @@ -489,7 +489,7 @@ static int quadfs_pll_is_enabled(struct clk_hw *hw) struct st_clk_quadfs_pll *pll = to_quadfs_pll(hw); u32 npda = CLKGEN_READ(pll, npda); - return !!npda; + return pll->data->powerup_polarity ? !npda : !!npda; } static int clk_fs660c32_vco_get_rate(unsigned long input, struct stm_fs *fs, @@ -774,7 +774,7 @@ static void quadfs_fsynth_disable(struct clk_hw *hw) if (fs->lock) spin_lock_irqsave(fs->lock, flags); - CLKGEN_WRITE(fs, nsb[fs->chan], !fs->data->standby_polarity); + CLKGEN_WRITE(fs, nsb[fs->chan], fs->data->standby_polarity); if (fs->lock) spin_unlock_irqrestore(fs->lock, flags);