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: 6661691 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 7863E9F380 for ; Tue, 23 Jun 2015 14:14:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE93C2060A for ; Tue, 23 Jun 2015 14:14:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 B5DE420619 for ; Tue, 23 Jun 2015 14:14:32 +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 1Z7Ovm-0008Sh-2P; Tue, 23 Jun 2015 14:12:06 +0000 Received: from mail-wi0-f181.google.com ([209.85.212.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z7OuM-0007ik-N6 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jun 2015 14:10:40 +0000 Received: by wicgi11 with SMTP id gi11so18067591wic.0 for ; Tue, 23 Jun 2015 07:10:16 -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=wgTIBp+3eSjwldthgjJta3OqLoHJ/evRO8+2Ed/GNHA=; b=I9rKRJAeW1oVGIOgrA+fFFZRvv2abjKnkYYaz3ChS07m6g/Hz6qyKy8CYS9JIMpQgl GJBvSPORYMKcBMWXXW4/7MsD0o409nhFKbc4Sw8wgJX4racHcDx7ouvICGZfJDeARhsU vxonMiwafXuwsgMzT+R2F0EBOB/Tig1hqCiUYGu4Cgj1AMa5BnGmBy1bzXSrKOEygv21 l/bn/vbAnht99pw2k3e8nv8PaPVoZWSS6q3hhXzWonUZGBzhAEOVfKxBGCaIVFqffe7I VOfgniMYp4SbYDs8zMCle+5jD3MebEwsjpRKtqANbH+KgUOySyeOCviuE5vRdVzHa3gn g7/A== X-Gm-Message-State: ALoCoQkjoXI3npNAKbuLhLQNwmkElkHbo0CuLds5qvj1J884LodzzpSyAiB5tLWHLspueAgZGB53 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150623_071038_946022_86E5D725 X-CRM114-Status: GOOD ( 15.32 ) X-Spam-Score: -2.6 (--) Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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);