Received: by 10.192.165.156 with SMTP id m28csp1405021imm; Wed, 18 Apr 2018 09:07:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+QFyTj8BXuZpX8ieRF08+PluaJTaJAF21SZLc4n/2f4oZB8waRSsFG92BzvPY1ofcakI+x X-Received: by 2002:a17:902:a985:: with SMTP id bh5-v6mr2702146plb.0.1524067658557; Wed, 18 Apr 2018 09:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524067658; cv=none; d=google.com; s=arc-20160816; b=r5kqfj9UjE7SareEBXATxsGr3dFlNXgfUoKF5T7quePDBraCQnz8oChfRGpgbNvvAo 7VKDpghs+0ICOeDnf+bYAy+6/DCwbRwKmrUFHW6C0pv2xuhsu/v+WeHc2yD4ySg7TKJO oniEzRMFkvPVYpazXUZTtFodW5/IGwEG/G9oS0TjELJ2InkjZSGqlooxhf8GICvY2J/f qXMzEQWCFF2fxXt8NkZMNMZUJaPBd4lgxjolgegpdNNkjzHFXFYKo4+XR7+oxi8A97mp gjhQu4xLKFf+xzb45oxm+KoF5IzHFVQ2YVGPGetOhTumNqDiOGZ8xxZEcN6yAYdkeAKH jFoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Kwl6Vy/4WTSpFK57QOX7+ym3CBdQeJlm4ElrQpHDHYY=; b=J8JZUK98ZOi9T8kwCL5idhQiO/d4FFdfzRgeO0tCZblDkIIHL6hVwA9UQ/pANV6ChQ qM/D9p7TpxWMl24WmjzqrIuuFA94ipxfGG5nhCZDveca9eXM+ooqEm7XcOix4p/IpSy1 2WKVv0IwOR1xzTU3CtIOM02YW0HfK5feElJy733auivVVmrnzyBpyxMKeBZ/bXJWfiVo nVBPWJvlWsSSYMosZZ428Sf7HMcqGzzLi75IApkRs01vCmyr6BsaWmEKX4dvfUzbXwXA Wcmp58Xbiq5f7Q7t1cx3KqZXeKBGsbAqGWJKiZT+e5FAECBg1tgRgJiKA2UW7kEtBijV uKzA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a188si1339668pgc.204.2018.04.18.09.07.24; Wed, 18 Apr 2018 09:07:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753057AbeDRQFl (ORCPT + 99 others); Wed, 18 Apr 2018 12:05:41 -0400 Received: from smtp-out-so.shaw.ca ([64.59.136.137]:38314 "EHLO smtp-out-so.shaw.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752999AbeDRQFj (ORCPT ); Wed, 18 Apr 2018 12:05:39 -0400 X-Greylist: delayed 487 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Apr 2018 12:05:39 EDT Received: from triton.mmayer.net ([96.48.174.102]) by shaw.ca with ESMTP id 8pSbf2BfoLkoz8pScfzTJS; Wed, 18 Apr 2018 09:57:31 -0600 X-Authority-Analysis: v=2.3 cv=OeS28CbY c=1 sm=1 tr=0 a=IfKG9KDHjPrX0SZ8gMoyrg==:117 a=IfKG9KDHjPrX0SZ8gMoyrg==:17 a=Kd1tUaAdevIA:10 a=pGLkceISAAAA:8 a=Q-fNiiVtAAAA:8 a=XW4pkaav5ZQx9IFfAeAA:9 a=Fp8MccfUoT0GBdDC_Lng:22 Received: by triton.mmayer.net (Postfix, from userid 501) id 2CAE32046F159F; Wed, 18 Apr 2018 08:57:29 -0700 (PDT) From: Markus Mayer To: Viresh Kumar , "Rafael J. Wysocki" , Brian Norris , Gregory Fong , Florian Fainelli Cc: Jim Quinlan , Broadcom Kernel List , Power Management List , ARM Kernel List , Linux Kernel Mailing List , Markus Mayer Subject: [PATCH 2/2] cpufreq: brcmstb-avs-cpufreq: prefer SCMI cpufreq if supported Date: Wed, 18 Apr 2018 08:56:43 -0700 Message-Id: <20180418155643.36464-3-code@mmayer.net> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180418155643.36464-1-code@mmayer.net> References: <20180418155643.36464-1-code@mmayer.net> X-CMAE-Envelope: MS4wfI7G2cWSXehu2rOtki/wOTMDEpmKOxM7RtnOULAht0YItSq65Wqsw+lz8c025yGGXNNIVOnoGBbzcDKYY8S3zdmoyy0fKlb5p1WTd/BrZ4JYXr0ZqbkX ou7vLufXngcH4rlm2bEDIZlR8zEfaeiquMxwHhfi63yBWZqho9PWt2bJ55lsZqJpFySqEyCdiNfoJqZXVz8K5ZJE/NimLXC9oi2IPCUiBqIW2l98NBkyyfpR 1wnPIkiStonciztMZRupmsAdV+cldr1bwUjN0aisV3h2mFY03RtBXzfUw25tc/4wBk1WaHyc0kPeLdmKvq38gVv96U4Dhet5MEj4DEnz6TBdrEPN40yPKdRd zzmTfW5v5CLjisbeEiJ33B4+MdHGh0s/iTdmjAmchst/sc7bOR3L4r4E4T0hm0FvaVClexawBm/qFHS62h8GWRUpX73qOZfA9EAwg3Wq7FaJC7ZtczEFZ+O3 GVdNyxg/1AAOnDj/yktO+mgVOBNaZHScxpVkL4owx951CgS7eu/zBeoyYUUAoe4zdxyqOkM1UdH3oW2H Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; + } + } + dev = &pdev->dev; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) -- 2.7.4