From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752141AbdBWEyv (ORCPT ); Wed, 22 Feb 2017 23:54:51 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:34916 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbdBWEyu (ORCPT ); Wed, 22 Feb 2017 23:54:50 -0500 Date: Thu, 23 Feb 2017 10:24:45 +0530 From: Viresh Kumar To: Vlad Zakharov Cc: "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mturquette@baylibre.com" , "sboyd@codeaurora.org" , "rjw@rjwysocki.net" , "linux-clk@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" Subject: Re: cpufreq: get cpufreq_frequency_table from clk driver Message-ID: <20170223045445.GA21911@vireshk-i7> References: <1487675614.25108.30.camel@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487675614.25108.30.camel@synopsys.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-02-17, 11:13, Vlad Zakharov wrote: > Hello, > > I am trying to implement a cpufreq driver for ARCHS cpu. You mean ARC architecture here ? > And I faced with one question I am not able to answer myself. cpufreq framework allows us using cpufreq frequency tables > that store available for current policy range of frequencies with any additional data. As I understand for example it > can be clock configurations for this particular frequency. Yes, it can be any platform specific data. Yes, but it is better handled by the clk driver in your case and cpufreq driver just needs to call clk_set_rate(). > Also I have a clk driver that manages actual cpu frequency. In fact it uses very similar tables that contain frequencies > and corresponding values of clock configurations registers that are to be set up with current frequency. Good. > So the question is can I get such tables from clk driver somehow? I would be very convenient: this tables differs for > ARCHS CPU. E.g. on different boards it is clocked by different PLLs and oscillators. Not that I am aware of. Just make copies for every board or if you can use device tree, get it using OPP tables. -- viresh