From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752510AbcD0Mnp (ORCPT ); Wed, 27 Apr 2016 08:43:45 -0400 Received: from foss.arm.com ([217.140.101.70]:34690 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753AbcD0Mno (ORCPT ); Wed, 27 Apr 2016 08:43:44 -0400 Subject: Re: [PATCH] cpufreq: st: enable selective initialization based on the platform To: Viresh Kumar References: <1461757227-22381-1-git-send-email-sudeep.holla@arm.com> <20160427114722.GO4225@vireshk-i7> Cc: Sudeep Holla , linux-kernel@vger.kernel.org, Lee Jones , "Rafael J. Wysocki" , linux-pm@vger.kernel.org From: Sudeep Holla Organization: ARM Message-ID: <5720B3FC.4070803@arm.com> Date: Wed, 27 Apr 2016 13:43:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160427114722.GO4225@vireshk-i7> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/04/16 12:47, Viresh Kumar wrote: > On 27-04-16, 12:40, Sudeep Holla wrote: >> The sti-cpufreq does unconditional registration of the cpufreq-dt driver >> which causes issue on an multi-platform build. For example, on Vexpress >> TC2 platform, we get the following error on boot: >> >> cpu cpu0: OPP-v2 not supported >> cpu cpu0: Not doing voltage scaling >> cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table >> for cpu:0, -19 >> cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6) >> ... >> arm_big_little: bL_cpufreq_register: Failed registering platform driver: >> vexpress-spc, err: -17 >> >> The actual driver fails to initialise as cpufreq-dt is probed >> successfully, which is incorrect. This issue can happen to any platform >> not using cpufreq-dt in a multi-platform build. >> >> This patch adds a check to do selective initialization of the driver. >> >> Cc: Lee Jones >> Cc: "Rafael J. Wysocki" >> Cc: Viresh Kumar >> Cc: linux-pm@vger.kernel.org >> Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for ST's platforms") >> Signed-off-by: Sudeep Holla >> --- >> drivers/cpufreq/sti-cpufreq.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c >> index a9c659f58974..5fce58712a97 100644 >> --- a/drivers/cpufreq/sti-cpufreq.c >> +++ b/drivers/cpufreq/sti-cpufreq.c >> @@ -259,6 +259,10 @@ static int sti_cpufreq_init(void) >> { >> int ret; >> >> + if ((!of_machine_is_compatible("st,stih407-b2120")) && >> + (!of_machine_is_compatible("st,stih407"))) > > Isn't just testing this for stih407 enough? instead of two ? > Yes that should be sufficient but it would be good if Lee confirms the same., just played safe :) -- Regards, Sudeep