From linux-omap-owner@vger.kernel.org Tue Jun 24 09:24:30 2008 Received: from localhost ([127.0.0.1] helo=dominion ident=koen) by dominion.dominion.void with esmtp (Exim 4.63) (envelope-from ) id 1KB2tC-0005XT-Mj for koen@localhost; Tue, 24 Jun 2008 09:24:30 +0200 Received: from xs.service.utwente.nl [130.89.5.250] by dominion with POP3 (fetchmail-6.3.6) for (single-drop); Tue, 24 Jun 2008 09:24:30 +0200 (CEST) Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959); Tue, 24 Jun 2008 09:20:48 +0200 Received: from smtp.utwente.nl ([130.89.2.8]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959); Tue, 24 Jun 2008 09:20:47 +0200 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m5O7BPWU031214 for ; Tue, 24 Jun 2008 09:11:25 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbYFXHLY (ORCPT ); Tue, 24 Jun 2008 03:11:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751405AbYFXHLX (ORCPT ); Tue, 24 Jun 2008 03:11:23 -0400 Received: from utopia.booyaka.com ([72.9.107.138]:44580 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbYFXHLX (ORCPT ); Tue, 24 Jun 2008 03:11:23 -0400 Received: (qmail 1744 invoked by uid 526); 24 Jun 2008 07:11:21 -0000 Date: Tue, 24 Jun 2008 01:11:21 -0600 (MDT) From: Paul Walmsley To: linux-omap@vger.kernel.org Subject: [PATCH] OMAP3 clock: fix DPLL jitter correction and rate programming Message-ID: User-Agent: Alpine 1.00 (DEB 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org X-Spam-Status: No X-OriginalArrivalTime: 24 Jun 2008 07:20:48.0265 (UTC) FILETIME=[D325F790:01C8D5CA] Fix DPLL jitter correction programming. Previously, omap3_noncore_dpll_program() stored the FREQSEL jitter correction parameter to the wrong register. This caused jitter correction to be set incorrectly and also caused the DPLL divider to be programmed incorrectly. Also, fix DPLL divider programming. An off-by-one error existed in omap3_noncore_dpll_program(), causing DPLLs to be programmed with a higher divider than intended. Signed-off-by: Paul Walmsley --- arch/arm/mach-omap2/clock34xx.c | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 408b51a..8fdf8f3 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c @@ -346,14 +346,17 @@ static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel) /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */ _omap3_noncore_dpll_bypass(clk); + /* Set jitter correction */ + v = __raw_readl(dd->control_reg); + v &= ~dd->freqsel_mask; + v |= freqsel << __ffs(dd->freqsel_mask); + __raw_writel(v, dd->control_reg); + + /* Set DPLL multiplier, divider */ v = __raw_readl(dd->mult_div1_reg); v &= ~(dd->mult_mask | dd->div1_mask); - - /* Set mult (M), div1 (N), freqsel */ v |= m << __ffs(dd->mult_mask); - v |= n << __ffs(dd->div1_mask); - v |= freqsel << __ffs(dd->freqsel_mask); - + v |= (n - 1) << __ffs(dd->div1_mask); __raw_writel(v, dd->mult_div1_reg); /* We let the clock framework set the other output dividers later */ -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html