From patchwork Tue Jul 28 11:20:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51582 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id CD102214B7 for ; Tue, 28 Jul 2015 11:21:01 +0000 (UTC) Received: by lbcjf8 with SMTP id jf8sf36937705lbc.0 for ; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=xFcoceiRVB65+ch2IYGV9Q+j1YEEOfDpURNlRgV1Z84=; b=JVPJ4AnosZwQQKAx0y+jd1KxL6GhHzGIH+HqADrn2afkRHYRbLkisnd28kHmXMIUB7 Ci0i8pnOCQa6o3yj3TyhZsXCokgtw/CHq74SLXyysjHVHVpEbM7RyfXN85RVS3EB6dsy wWERSboBWgW6Tj881ZDymWe++qGJPGVnJd2iZGnJV38iMbG2QqKYkXRkbX+Cx3Rz3uBB Mxtcbb9FW72oJyk/5ig8FVkMs0Vw7A5HHCUzGUbm4SZ18YnzXyl+Ca7kggaBdDF2MF1H 2msKbMiTm+/eD52VWe1PbRqFeQr2OFQDOlAcJvK6Pz56rNzdOjmRMcZWZl+esgKWGi9F 6xqg== X-Gm-Message-State: ALoCoQm6tSIDRDBOR+j5uG5k20xJXGV8kwa4qbg5cUkY9hq9BPQP95vbK4bUn50UhOCScf1XHjr4 X-Received: by 10.112.142.97 with SMTP id rv1mr1929511lbb.12.1438082460760; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.107 with SMTP id lf11ls49352lac.40.gmail; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) X-Received: by 10.112.202.234 with SMTP id kl10mr32113331lbc.51.1438082460577; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id e14si18027852lbo.160.2015.07.28.04.21.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 04:21:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by laah7 with SMTP id h7so66484784laa.0 for ; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr32606551lbb.35.1438082460212; Tue, 28 Jul 2015 04:21:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp2075293lba; Tue, 28 Jul 2015 04:20:59 -0700 (PDT) X-Received: by 10.70.33.67 with SMTP id p3mr80152004pdi.126.1438082458292; Tue, 28 Jul 2015 04:20:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si8865220pdr.5.2015.07.28.04.20.57; Tue, 28 Jul 2015 04:20:58 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932421AbbG1LUo (ORCPT + 28 others); Tue, 28 Jul 2015 07:20:44 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34600 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755657AbbG1LUl (ORCPT ); Tue, 28 Jul 2015 07:20:41 -0400 Received: by pacan13 with SMTP id an13so69856533pac.1 for ; Tue, 28 Jul 2015 04:20:40 -0700 (PDT) X-Received: by 10.66.160.1 with SMTP id xg1mr75353148pab.27.1438082440710; Tue, 28 Jul 2015 04:20:40 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id to5sm34861551pac.33.2015.07.28.04.20.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 28 Jul 2015 04:20:40 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, b.zolnierkie@samsung.com, nm@ti.com, sboyd@codeaurora.org, Viresh Kumar , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 4/4] cpufreq: dt: Add support for turbo/boost mode Date: Tue, 28 Jul 2015 16:50:03 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , With opp-v2 DT bindings, few OPPs can be used only for the boost mode. But using such OPPs require the boost mode to be supported by cpufreq driver. We will parse DT bindings only during ->init() and so can enable boost support only after registering cpufreq driver. This enables boost support as soon as any policy has boost/turbo OPPs for its CPUs. We don't need to disable boost support as that is done by the core, when the driver is unregistered. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index c6e7033076de..b9259abd25d4 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -330,6 +330,14 @@ static int cpufreq_init(struct cpufreq_policy *policy) goto out_free_cpufreq_table; } + /* Support turbo/boost mode */ + if (policy_has_boost_freq(policy)) { + /* This gets disabled by core on driver unregister */ + ret = cpufreq_enable_boost_support(); + if (ret) + goto out_free_cpufreq_table; + } + policy->cpuinfo.transition_latency = transition_latency; of_node_put(np);