Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1566613imm; Tue, 22 May 2018 06:09:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrq47M49W2PRmoT0v4t1Za04p8YcOr/Ys40BFfFg7TIgc2HLIs6WFbwcwb7v8QdWFY6YHFS X-Received: by 2002:a17:902:6903:: with SMTP id j3-v6mr24762967plk.313.1526994550205; Tue, 22 May 2018 06:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526994550; cv=none; d=google.com; s=arc-20160816; b=c1XI0zfE0yhxZebBdk3JBbIRdByTYMq7YjMWTg343MIpGujw2BieS0ZncykhQCsh2j Pfo9+Wcyk5fgH3tNN4VeyRjEUb0NSrpEKuPBs7RLfCZfiscydHVWLQYC448odHafcWxX w9Lw6aTfVNkYjT6BSsZy69RUc5xpjxE0jQDPHtSl7rKP5l2fIT5Yi+BewFM/DZdVq4tr g4pEy7pbmrzIyrXWaJ4UjO8PFQX2Fw1xH11FXgrXqMgDhBnlZpTUeU9pdUoQxONPtfU9 ZnzvtlKy4SHoJSlctkGW6E9ONse8UPnJhWQqr0Zegorgbp+fB0xTsd/zvXsWe3Fbl/ac qcFg== 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:arc-authentication-results; bh=SLRz7mvkRbRvByG3EcFni/FuzGhjQt1bJQdHW1o7fJI=; b=BkxngIs3GNH6Csx/M5tRtRFdnRePVwI90VIJh2E1g2wsZ6fUP5Vs/e91BY8+rDTB92 LqBmUPPbMDVVj0sCUPpFlJvwMABAuFq8GD+J4STFaAODFOknQMNxAXF1ahX3t4P3dKfG F+CCJNc9w4ibUfw7jsMGjdjBNBCrYcxhKQJZHsO7Os2O3eY5e0ALx3+LFjv30Tga+OiK EW/hy9Rho+Pl+a0g4wO0pGcSJK7GRh3OpeuzNw4VwsLbRWPcZ0WsnrmN2s1q8lJdOB2/ JNNsddN4E5vm6bwd5Yrm+PKdQOJ9rUkwlV0/dAKSQsWMlIQBoDSxRM8jXd6NycqFHza4 lfjg== 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 m2-v6si11210635pgm.306.2018.05.22.06.08.30; Tue, 22 May 2018 06:09:10 -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 S1751461AbeEVNHQ (ORCPT + 99 others); Tue, 22 May 2018 09:07:16 -0400 Received: from foss.arm.com ([217.140.101.70]:37426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbeEVNHO (ORCPT ); Tue, 22 May 2018 09:07:14 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 775331435; Tue, 22 May 2018 06:07:13 -0700 (PDT) Received: from e107155-lin (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 730AF3F24A; Tue, 22 May 2018 06:07:11 -0700 (PDT) Date: Tue, 22 May 2018 14:07:04 +0100 From: Sudeep Holla To: Ilia Lin Cc: viresh.kumar@linaro.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla Subject: Re: [PATCH] cpufreq: Add Kryo CPU scaling driver Message-ID: <20180522130704.GA31065@e107155-lin> References: <1526729701-8589-1-git-send-email-ilialin@codeaurora.org> <1526988585-21678-1-git-send-email-ilialin@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526988585-21678-1-git-send-email-ilialin@codeaurora.org> 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 Tue, May 22, 2018 at 02:29:45PM +0300, Ilia Lin wrote: > In Certain QCOM SoCs like apq8096 and msm8996 that have KRYO processors, > the CPU frequency subset and voltage value of each OPP varies > based on the silicon variant in use. Qualcomm Process Voltage Scaling Tables > defines the voltage and frequency value based on the msm-id in SMEM > and speedbin blown in the efuse combination. > The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the SoC > to provide the OPP framework with required information. > This is used to determine the voltage and frequency value for each OPP of > operating-points-v2 table when it is parsed by the OPP framework. > > Signed-off-by: Ilia Lin > Acked-by: Viresh Kumar [...] > + > + switch (msm8996_version) { > + case MSM8996_V3: > + versions = 1 << (unsigned int)(*speedbin); > + break; > + case MSM8996_SG: > + versions = 1 << ((unsigned int)(*speedbin) + 4); > + break; > + default: > + BUG(); > + break; > + } > + > + for_each_possible_cpu(cpu) { > + cpu_dev = get_cpu_device(cpu); > + if (NULL == cpu_dev) { > + ret = -ENODEV; > + goto free_opp; > + } > + > + opp_tables[cpu] = dev_pm_opp_set_supported_hw(cpu_dev, > + &versions, 1); Will be not get NULL for all CPUs except 0 ? I haven't seen the patches from Viresh yet, if that prevents getting NULL or not. -- Regards, Sudeep