From patchwork Fri May 3 05:53:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Belisko Marek X-Patchwork-Id: 2515191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 6F4B23FCA5 for ; Fri, 3 May 2013 05:54:14 +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 1UY8wY-00080T-RD; Fri, 03 May 2013 05:54:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UY8wW-0008J3-7E; Fri, 03 May 2013 05:54:04 +0000 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UY8wR-0008IM-Ku for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2013 05:54:00 +0000 Received: by mail-ea0-f176.google.com with SMTP id h14so597475eak.21 for ; Thu, 02 May 2013 22:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=FToUrIF3Uq3hOLuEFLNw9XKK7dOzxEW3y9LGDjVuwio=; b=PAbR/i+HFnbLMLrOhHhtO3BCTG1mySRWjJK9Dom3P+frCnqSSrvfXyJzEtFonOp8ms 95bJFmybigzOVG+U9bk3zvMDuHpNIFmlcgf4jpm09h1roee89zd4XWzqqIUZNdVTsFmd rRp/Sn1fiIzcVNjjjHDl9lMBxbh/Abvu0rwZNstmgihb0gtc+zVC20k3QhswSlib0XMa LSwnTHSAOiLt7cV0T0H7r5Q2AFFAwrXdNI1FwrMYZVEoWxMIk27yBYfaZ368c9MYl/DA HqzF8oHohJva0hAuAGppSrLfqHAM0gzqu/+tKZdGG1E0UMS4Jstvt7rnAM5cBCpeUGWB BZNg== X-Received: by 10.14.107.3 with SMTP id n3mr8555478eeg.42.1367560417664; Thu, 02 May 2013 22:53:37 -0700 (PDT) Received: from localhost.localdomain (81.89.61.168.vnet.sk. [81.89.61.168]) by mx.google.com with ESMTPSA id t9sm1085469eeo.11.2013.05.02.22.53.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 22:53:36 -0700 (PDT) From: Marek Belisko To: mturquette@linaro.org Subject: [PATCH v2 1/2] clk: si5351: Fix clkout rate computation. Date: Fri, 3 May 2013 07:53:22 +0200 Message-Id: <1367560403-21685-1-git-send-email-marek.belisko@streamunlimited.com> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130503_015359_813451_BC68FB94 X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (marek.belisko[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Marek Belisko , vladimir.koutny@streamunlimited.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, zonque@gmail.com 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 Rate was incorrectly computed because we read from wrong divider register. Signed-off-by: Marek Belisko Acked-by: Sebastian Hesselbarth --- drivers/clk/clk-si5351.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index 8927284..cf39e53 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -932,7 +932,7 @@ static unsigned long si5351_clkout_recalc_rate(struct clk_hw *hw, unsigned char reg; unsigned char rdiv; - if (hwdata->num > 5) + if (hwdata->num <= 5) reg = si5351_msynth_params_address(hwdata->num) + 2; else reg = SI5351_CLK6_7_OUTPUT_DIVIDER;