From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shawn Guo Subject: Re: [RFC] cpufreq-cpu0: allow OPP table supplied by platform Date: Fri, 14 Mar 2014 20:32:06 +0800 Message-ID: <20140314123205.GC813@S2101-09.ap.freescale.net> References: <20140313184859.7d6f6512@xhacker> <20140313194424.122ec572@xhacker> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Received: from ch1ehsobe005.messaging.microsoft.com ([216.32.181.185]:59461 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753620AbaCNMbW (ORCPT ); Fri, 14 Mar 2014 08:31:22 -0400 Content-Disposition: inline In-Reply-To: <20140313194424.122ec572@xhacker> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Jisheng Zhang Cc: Viresh Kumar , Shawn Guo , "Rafael J. Wysocki" , "linux-arm-kernel@lists.infradead.org" , "cpufreq@vger.kernel.org" , "linux-pm@vger.kernel.org" On Thu, Mar 13, 2014 at 07:44:24PM +0800, Jisheng Zhang wrote: > > On 13 March 2014 16:25, Viresh Kumar wrote: > > > On 13 March 2014 16:18, Jisheng Zhang wrote: > > >> Hi all, > > >> > > >> cpufreq-cpu0 is suitable for Marvell Berlin SoC. But there's one issue > > >> to address. The opp is different between chips even on the same step > > >> SoC, BG2Q for example. we can calculate the OPP table from the value of > > >> one OTP register. We have two solutions: > > >> > > >> 1. bootloader reads OTP register and calculate the OPP table then change > > >> dtb danamically > > >> > > >> 2. supply one driver in mach-berlin to initialize the OPP table; and > > >> modify cpufreq-cpu0 to allow platform supply OPP table, fall back to > > >> of_init_opp_table() if there's no OPP table. > > >> > > >> Which solution is better? > > > > > > I think we can go ahead with second option here. We can just check if opp > > > tables are already initialized or not. In case they are, don't probe from > > > dt.. > > > > > > But lets see with others have to say here.. Yea, we had gone for the second option on imx6q-cpufreq driver with commit 20b7cbe (cpufreq: imx6q: add of_init_opp_table). Shawn