Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11086842ybi; Thu, 25 Jul 2019 09:44:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5G1yzU1SZgIBKsahxXzJAREylPRZYWZLOmH9KJY/8awVEClQPklhsSXSCEUN+LutoyxCA X-Received: by 2002:aa7:9531:: with SMTP id c17mr18232242pfp.130.1564073090743; Thu, 25 Jul 2019 09:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564073090; cv=none; d=google.com; s=arc-20160816; b=Ydc1lcF6iLqQuZRD6hw7Wq/kxRgBDl3dCqWbo+aD6iSFF10S4q6mDzymKJm5DBVNfC AUuRJ7R1rhCW+SrKbmD9H9ve5Etxd/cma3sbehiPUqm5/qX6k5Slpk6LdoZdKTupN+w8 aIFGIdSOxnktBz2BEB8nb85A0POI2LDOClxhucN9kbtiJZZBoRLaZMgwSUTwTKuYTd8q 4jbQMjM6v4+aDvrFp+CAIEGSiyZpPb7DHu/ukbfpbBlLIzyTP/WDH7cirrsee3vR9rVq jtKhO1H4QOZUTjkBUmjuypJxewo/bv8CDWheSVUTO4TNDuzgdnVi10jITJ+4a3xGTKFT w+UA== 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; bh=+UWD3xYaSGOyTzdv6esnqt7Upp+zoX6rMbyHIp+AOY4=; b=b8oQvQmr2GrXjxbCghUttrHtRmXOqhTp07XZ+IFiZku25BjNh0dRGR+zOBG5kF8tUH 6XWaqVuW5FjvcD+DFfh4+ilEpUWVEhDgTFzVONuejXhJcT0ZRd5W+iDsx7CLRhiSHBcM 7FvdWYDyTuPRvU3C/MwFBAd+gYLrvcE89t2GzE0gSAaeR++jMF5qkddHD99BTlN68LHw eR6dsLgdIST/VhMP4DwGfV5lwE/qU6QAjhKBVCStPTWMM3yRF91NVC1NmQqVQMzd+T16 nLZEwP0933BU2gbuchMErFHo+GnBqJUD965MpGok/PYgCshQvxu1tVqGQDw7UIGJmq4w BGdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LRA93SCm; 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 x1si17415286pgt.258.2019.07.25.09.44.36; Thu, 25 Jul 2019 09:44:50 -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=LRA93SCm; 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 S2387630AbfGYKkg (ORCPT + 99 others); Thu, 25 Jul 2019 06:40:36 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35422 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387602AbfGYKkg (ORCPT ); Thu, 25 Jul 2019 06:40:36 -0400 Received: by mail-lf1-f68.google.com with SMTP id p197so34142658lfa.2 for ; Thu, 25 Jul 2019 03:40: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=+UWD3xYaSGOyTzdv6esnqt7Upp+zoX6rMbyHIp+AOY4=; b=LRA93SCm5QQuPJ6N6Qfi90MXp6KuO+w3c8jbPxdOZFNgztdWErMFHqN1EcFYyzYdQ0 sdGMNhKOvpnrS7wxjtdCQ9gS/PLfXOSadeZmRLRHME9HvGUcD322RyALyQz8Nfs9gTGG 03/kqLr99SEtkpPoneETS/y65I8m7nXrcLzBPWSDVZ3PCFaN4sz9qfW2AUUqHSHcA/+4 hFH4jiEmQ2Zr/KglfFp1AAzrXuYxAJc6TBJ2ZkdT+6gPezz77i6h2ywYNKzCIFySlgCD bTGifd4WQ01KI/JL7q5k7o0MF941I1LgbPdR0NrwaULx/yiFm2IQ/rAX2FbHlcHo8jYk a7uw== 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=+UWD3xYaSGOyTzdv6esnqt7Upp+zoX6rMbyHIp+AOY4=; b=OiHd8tFh8e6g6twBd81ZngJpMJ+ZPzzWiPtX6+Bmc8AiPHeeGwCfnnoSjZVjmM38b1 rHmsm+mnaUIGWxQHSrEwFaHKTyW9bAvAyph4DeEIldHMHSVKMoSHdml3l88qPRFq2+3q C3wEssTuSBiQfg//vd0uM6uI9Y6TjoWB3IXbTeTscJcx+TOaUCSeC3bNX7ELpxYPG+EN +/iSVW+1LxMPVaKmDJzPHCWSIxQDo4JdsMTsZ+Y1w6hYtwcata8qyxtg8aduN48yxyhh eW6D1sR8ZA+9T5T3o8FZmyqgc1nZq8llIeMy12U4zuyLfeZ4YEFtAIFsLczfC6VSj6XO v2CA== X-Gm-Message-State: APjAAAXT9uTLWsqXg20lGl/0XVqBP+JAdZe035gswQqQHQG8W6P0q4xX GRdOsPrM+lFWssRajIcN3RjIVw== X-Received: by 2002:ac2:414d:: with SMTP id c13mr2229756lfi.47.1564051234400; Thu, 25 Jul 2019 03:40:34 -0700 (PDT) Received: from centauri (ua-83-226-44-230.bbcust.telenor.se. [83.226.44.230]) by smtp.gmail.com with ESMTPSA id b17sm9057244ljf.34.2019.07.25.03.40.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 25 Jul 2019 03:40:33 -0700 (PDT) Date: Thu, 25 Jul 2019 12:40:31 +0200 From: Niklas Cassel To: Viresh Kumar Cc: Andy Gross , linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, vireshk@kernel.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table Message-ID: <20190725104031.GA21998@centauri> References: <20190705095726.21433-1-niklas.cassel@linaro.org> <20190705095726.21433-12-niklas.cassel@linaro.org> <20190710090303.tb5ue3wq6r7ofyev@vireshk-i7> <20190715132405.GA5040@centauri> <20190716103436.az5rdk6f3yoa3apz@vireshk-i7> <20190716105318.GA26592@centauri> <20190717044923.ccmebeewbinlslkm@vireshk-i7> <20190719154558.GA32518@centauri> <20190723015635.rl5a2isjnjn23fzh@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190723015635.rl5a2isjnjn23fzh@vireshk-i7> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 23, 2019 at 07:26:35AM +0530, Viresh Kumar wrote: > On 19-07-19, 17:45, Niklas Cassel wrote: > > Hello Viresh, > > > > Could you please have a look at the last two patches here: > > https://git.linaro.org/people/niklas.cassel/kernel.git/log/?h=cpr-opp-hz > > There is no sane way of providing review comments with a link to the > git tree :) > > I still had a look and I see that you don't search for max frequency > but just any OPP that has required-opps set to the level u want. Also, > can't there be multiple phandles in required-opps in your case ? For each OPP in the CPR OPP table, we need three things, opp-level, qcom,fuse-level and opp-hz. The first two can simply be parsed from the OPP node itself while iterating the CPR OPP table. The opp-hz has to be fetched from the CPU OPP table. Several OPPs might have the same qcom,fuse-level value. However, they will have unique opp-level values and unique opp-hz values. Each opp-level has a matching opp-hz. required-opps is basically a connection between a opp-hz (CPU OPP table) and and a opp-level (CPR OPP table). So there will be only one match. No need to search for max frequency. I think you are confusing this with something else. The CPR hardware has to be programmed with the highest frequency for each qcom,fuse-corner. This is done here: https://git.linaro.org/people/niklas.cassel/kernel.git/tree/drivers/power/avs/qcom-cpr.c?h=cpr-full#n1219 by saving the highest frequency for each fuse level while iterating the OPP table. There can be only one phandle in the required-opps in my case, this is one of the reasons why I prefer implementing it in the CPR driver. If it were to be implemented in OPP core, it probably has to handle multiple phandles. > > > If you like my proposal then I could send out the first patch (the one to > > OPP core) as a real patch (with an improved commit message), and > > incorporate the second patch into my CPR patch series when I send out a V2. > > Send them both in your series only, otherwise the first one is useless > anyway. Ok, will do. Kind regards, Niklas