From patchwork Tue Apr 23 06:22:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Belisko Marek X-Patchwork-Id: 2475551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 41B3CDF2E5 for ; Tue, 23 Apr 2013 06:23:27 +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 1UUWdN-0005cs-4K; Tue, 23 Apr 2013 06:23:21 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUWdJ-0000KQ-II; Tue, 23 Apr 2013 06:23:17 +0000 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUWdG-0000Jh-2j for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2013 06:23:15 +0000 Received: by mail-ea0-f172.google.com with SMTP id g14so79736eak.31 for ; Mon, 22 Apr 2013 23:23:10 -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=UmmfpVXkfhJz+KMWIBw7WoCzzVojdjM0eAmq3uYEJFo=; b=SoSMVTdxnqZOEc+8pHJCY+cjfmWGBHQy7Z8tFVhg3PCryYn7rb2sDYfdGZLY8wcDvf Ux6XGBnKnOioCdyqjDx81UNWsSf8GE1yDYD7JlT/3KigW3l/zYNvfejTy+qgYfzCQH3W bsWFOM/9U5sEX7gYq8Sgf/kwsjd3zm5267IwHVWAOm7Eq+pmg4/B2F/9QTIsVh0HPmZ3 KRr4gFubeTi1P9tPuT88NqR6eCbnJLuKrb9qZkRZs7LItxTEzdh6zdAIh7VvC34qGDZc w5g+MZedQ8krjbM61YPE/Xo6iwgcckPED+uEBCoI4wGCNt/lSJ4KLVTqB95K1iqESJVG ywXQ== X-Received: by 10.14.39.5 with SMTP id c5mr48135380eeb.27.1366698190870; Mon, 22 Apr 2013 23:23:10 -0700 (PDT) Received: from localhost.localdomain (81.89.61.168.vnet.sk. [81.89.61.168]) by mx.google.com with ESMTPS id n48sm44713128eeg.12.2013.04.22.23.23.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 23:23:10 -0700 (PDT) From: Marek Belisko To: mturquette@linaro.org Subject: [PATCH 1/2] clk: si5351: Fix clkout rate computation. Date: Tue, 23 Apr 2013 08:22:49 +0200 Message-Id: <1366698170-31346-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-20130423_022314_323820_CB1C69AC X-CRM114-Status: GOOD ( 10.57 ) 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 , sebastian.hesselbarth@gmail.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;