Received: by 10.192.165.156 with SMTP id m28csp241919imm; Wed, 18 Apr 2018 21:17:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx49jaS5N7YJcsZleFpm8qwf7siuPBHkGV+lDxLCWq9jyA2JukZsc6sOeJgXgX0dMw+LUxKb3 X-Received: by 10.101.81.131 with SMTP id h3mr3840547pgq.110.1524111474602; Wed, 18 Apr 2018 21:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524111474; cv=none; d=google.com; s=arc-20160816; b=BBeLAO2orjts0mKImqFauQCtSWuX9vH4igomw6jkbccNySDZUERaBNoQ3WMAFxv8WC PuzZApmBRAC7vwuFdqdpEHVL+W4sWkjA+3ToA1tOSRK+e+QEjqs82qQsygtumL5TqTos KNlHXt2fhQtos9VpveFakWxPk7PQbj2xTvmrlGn2xFFHpnoDV1jIiQKev2BWqmdlYXcz PFQtVMxejlhlBLG9oVdcmwHviUXzDnJk5sGYj0PcYkxCb1QxA2YBnZiduWf5WXF+N0YF 4xvyyA0+bb/YdrMVQ6UYa/qw1HVNgiC4iBuEneTc59IN+nt2TQRHGvxhQG7Pf6f+q9A8 mZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=4cOa20tJarszv1ZSs9nIVrSMrkozXnyyR6N2lDJPTgc=; b=xT6Zn6OSU7wb3mmAdkFgd/qpLM884Ydr1LadLjOIMWxC048n5GwFxn5uZpttViK93R LGLDzSHTFECfORQx3mQ27smbFpvGh0o8v1Vj3wWki7liG7XF03uS3r3fFW9MGKsZ2VsN PlRfTY9fh2HpyieOmU2l3iQaYLW0NbbJMV0NObQMgm/L738aiiw24dCOP/vsn5mBy4KA 5VIPNYWxQUbmn5D8m12DVF14u/C+NkoiV4d/4Gufy7M3VnJc9ztG45ouChdFfyjHzDtM vv+Pj486aO7GFf0a4j7H7tHT3rVtzkICZfg9RlhjhmAg9AqhOcwQHNJZ/uIo+azj0O6R JW0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bk8XQhNl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9-v6si2568024plt.413.2018.04.18.21.17.40; Wed, 18 Apr 2018 21:17:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bk8XQhNl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751130AbeDSEQh (ORCPT + 99 others); Thu, 19 Apr 2018 00:16:37 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:43949 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbeDSEQf (ORCPT ); Thu, 19 Apr 2018 00:16:35 -0400 Received: by mail-pf0-f194.google.com with SMTP id j11so1974171pff.10 for ; Wed, 18 Apr 2018 21:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4cOa20tJarszv1ZSs9nIVrSMrkozXnyyR6N2lDJPTgc=; b=bk8XQhNlLzqrjsU7BJBXi09E8yzfl1xzpwmVNCYxY48/cUuby9YxiBG6nuOvDwWrX/ 2p4imlAkhmevshMZQWdgEboyhcYIveSrxWgghvw1mvoeL7Lsoi8cpCCiqe5lr+FIaL6z MazJTItsNV21BeUczcS694fVBQyefIk646xHc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4cOa20tJarszv1ZSs9nIVrSMrkozXnyyR6N2lDJPTgc=; b=C6UCKXLepKCjoaw5G/WfDPJfUG9nAFToZ5ZfNbj01bregESHKB8KP0uRXJydSuHw4d sMqrsv3zylmQvm4R91Pb9Q+IEP8HZ7C4INlB6JMDIgbf7gYRHXZauDbXyBhOqy8+HezC Q68AisD1QsQWeJVL8Oj2X3+cwGK1Exs9sl1MDASWYgtnUmoLbt7Ii3aeZzzvOnxUaVRT j7UuK6ZdNdK9i9OCYZ5rXLVhyvSpS+jiBtKBWz6DDXf28+l++gBWXZdc1G61uCrL+2Hf TYwggzFNi686QA804MSY4AnU8CxsBSJQgXYp1v/B/3AKZMUZ0+JRu0wcQUIFpMfTtKkR KIoA== X-Gm-Message-State: ALQs6tAkpuvGt/6lzHZLpB631veOTUbjTaCJiF260QSdY3xjGKtpMObo xuR11VMM7XAIDyNcfBUl2/VRDA== X-Received: by 10.101.98.196 with SMTP id m4mr3789376pgv.329.1524111394937; Wed, 18 Apr 2018 21:16:34 -0700 (PDT) Received: from localhost ([122.172.94.91]) by smtp.gmail.com with ESMTPSA id t137sm6003134pgc.16.2018.04.18.21.16.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 21:16:34 -0700 (PDT) Date: Thu, 19 Apr 2018 09:46:32 +0530 From: Viresh Kumar To: Markus Mayer Cc: "Rafael J. Wysocki" , Brian Norris , Gregory Fong , Florian Fainelli , Jim Quinlan , Broadcom Kernel List , Power Management List , ARM Kernel List , Linux Kernel Mailing List , Markus Mayer Subject: Re: [PATCH 2/2] cpufreq: brcmstb-avs-cpufreq: prefer SCMI cpufreq if supported Message-ID: <20180419041632.GF24576@vireshk-i7> References: <20180418155643.36464-1-code@mmayer.net> <20180418155643.36464-3-code@mmayer.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418155643.36464-3-code@mmayer.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-04-18, 08:56, Markus Mayer wrote: > From: Jim Quinlan > > If the SCMI cpufreq driver is supported, we bail, so that the new > approach can be used. > > Signed-off-by: Jim Quinlan > Signed-off-by: Markus Mayer > --- > drivers/cpufreq/brcmstb-avs-cpufreq.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c > index b07559b9ed99..b4861a730162 100644 > --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c > +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c > @@ -164,6 +164,8 @@ > #define BRCM_AVS_CPU_INTR "brcm,avs-cpu-l2-intr" > #define BRCM_AVS_HOST_INTR "sw_intr" > > +#define ARM_SCMI_COMPAT "arm,scmi" > + > struct pmap { > unsigned int mode; > unsigned int p1; > @@ -511,6 +513,20 @@ static int brcm_avs_prepare_init(struct platform_device *pdev) > struct device *dev; > int host_irq, ret; > > + /* > + * If the SCMI cpufreq driver is supported, we bail, so that the more > + * modern approach can be used. > + */ > + if (IS_ENABLED(CONFIG_ARM_SCMI_PROTOCOL)) { > + struct device_node *np; > + > + np = of_find_compatible_node(NULL, NULL, ARM_SCMI_COMPAT); > + if (np) { > + of_node_put(np); > + return -ENXIO; > + } > + } > + What about adding !CONFIG_ARM_SCMI_PROTOCOL in Kconfig dependency and don't compile the driver at all ? -- viresh