From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754443AbaEOHrf (ORCPT ); Thu, 15 May 2014 03:47:35 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:57295 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbaEOHre (ORCPT ); Thu, 15 May 2014 03:47:34 -0400 Date: Thu, 15 May 2014 09:47:24 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Soren Brinkmann Cc: Mike Turquette , "Rafael J. Wysocki" , Viresh Kumar , Russell King , Michal Simek , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 0/5] Frequency resolution in CCF vs. cpufreq Message-ID: <20140515074724.GJ16662@pengutronix.de> References: <1400106655-22465-1-git-send-email-soren.brinkmann@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1400106655-22465-1-git-send-email-soren.brinkmann@xilinx.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:5054:ff:fec0:8e10 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 14, 2014 at 03:30:50PM -0700, Soren Brinkmann wrote: > Hi, > > I have one or two problems with cpufreq and the CCF, which are caused by > rounding/different frequency resolutions. > > cpufreq works with kHz, while the CCF uses Hz. On Zynq our default frequency is > 666666666 Hz which the CCF, due to rounding, reports as 666666660. And for Why does this happen? Isn't that a bug? What is the actual freqency? 666666666 Hz or 2000000000/3 Hz? > cpufreq, which simply divides values it obtains through clk_round_rate() by > 1000, 666666. > Since passing 666666 to clk_round_rate() does not result in 666666660 > (clk_round_rate() always rounds down!), we chose to put 666667 in the OPP. This What is OPP? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |