Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp2693299pxx; Sun, 1 Nov 2020 06:48:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxl04Lk1s0KfIPsZiMvb7qOZp2Nn2YBgiCUiJkpvl5J6eHwyBXtEIFHYkUxEg5fQj+i/xQM X-Received: by 2002:aa7:d783:: with SMTP id s3mr12536672edq.214.1604242095132; Sun, 01 Nov 2020 06:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604242095; cv=none; d=google.com; s=arc-20160816; b=SBniacAXsseBLuVuUH1wykc5fxrCkPO9aoSxSts6Gq9gTdS8FvLZHT1Ge6DTY85y34 Qp7gdOKbIBRPcqWxezDYRLH2gYpAxI1AYxiAv/qfqR9cLLhetvLEVvnY7uwoeLpJwwdo g8wGwuOTvMmpFxprtPtI9sJ97jABmGVgSfbbdnrGnJPWET4TuvtYL5yLCWFBpVnfZbcc eXjur4kf/ojYihv2wR4L6rROV2YjxEpKtij5ioRD/eY2IJrV/9+ON2M3US100wbfRuBq SCAvugBQPV+8VaideZMQfzVUBYKAZYl64c03eLcM49smykqggFbt54Svyo0uvTTPhkgp Nk9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:dkim-signature; bh=nfSTOQa1GHPu7yZflmElx1yrigDoZA+beTbfSTxADDQ=; b=BNNcFgEYKkQzT5rA3OrS6X3V2nBqiiuhd8cyNWjIKbY+wc54ahhimpw18vj5B6QF73 MfxZT01z/75BbIH2/qQaqwNPKN+MoWGb7oe4Peujc7LnSvJNDHMFxgc1jTh+UE+tNILp nrujWAkuwEwbfoCgcNOwA0jfUVNA31RVABwusdhTEhz4iCTs6HeKZAXOE8OiMLxbO3un WCbzmBUDli7cHvKWzUMlegvbfuSsy/eD91jwFY9FRXHhgD5Qv2yzL07a6SGoReOcf6Ej iNWX37a/2yGdi8iHP9eZf6QyY+oCZXpMOUmv6F3jS6eKX7O92orK4YRbS9J9L7UAHqQI 1WAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LNCbyfl8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw3si5167782ejb.666.2020.11.01.06.47.52; Sun, 01 Nov 2020 06:48:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LNCbyfl8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbgKAOpU (ORCPT + 99 others); Sun, 1 Nov 2020 09:45:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbgKAOpT (ORCPT ); Sun, 1 Nov 2020 09:45:19 -0500 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A091FC0617A6; Sun, 1 Nov 2020 06:45:18 -0800 (PST) Received: by mail-lf1-x144.google.com with SMTP id 141so14049359lfn.5; Sun, 01 Nov 2020 06:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=nfSTOQa1GHPu7yZflmElx1yrigDoZA+beTbfSTxADDQ=; b=LNCbyfl80w5m5vmdw3f6tkQFZPsqsLTQxD7B0YQ9lQsp91AmlP1vbAFBWNx1lZpLAd P38k7TmgrN7uaqeRam6cxqBfIwjYYLqYjvGGuwvZOqwRdmzY9yEqvtyWbHNwRtZNQ9vg MuVynxEAfEH9OIJ0IwgQTMEP9jtxTsxGwPF6tHrg4ERcckfqZGAgvFJ6TZP9o2+cIGDi fdUdmmpX5MwYo8Qy+YuyNywQgXTUSAFuARSWrtAYrm1zpbva063byVj2nxUXXovDzt8u xL7T3BWrj5oXGEBJdmPgkwsMNh1Zv8hRvSh9OdWVNAO9IELnHdrPWxk2Ax3Rl6A3VLf7 JBkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=nfSTOQa1GHPu7yZflmElx1yrigDoZA+beTbfSTxADDQ=; b=BnbSw1mVjGf3BIlk09CaRF8NJkipOUjgGbvqONvkRpwJ5lXBMLrvSZ2COpFSx68hbV BaLAgRkA8x1bXiwv8ZxtK3ZCsk6ceanDB9yMEWmnQ8P8GH+kK3GOyUtgNsCDRjkPbVqh HzmTl8RBQ1TtOJjFm6tpEaJTGfmoFWsKnwVeY9ag/ciB6p3VxIQRt1VeLzk9Zvj1qooA QHJpLCOEFMlL5o3xfsk7j0W6NdwKS3xc9gJasYUpITRSkWoB0ecuUH/Kvy9Z32miWZH7 vSVpyBH/geZ8sBLEOt+S1LArLmEcXSptkECh7SFNmD4z5edsumriYKwz2fhyDpZUb0no 6Duw== X-Gm-Message-State: AOAM532WE522ywBzDyRwcu0ExRq3235J7gWCaTYdcq7nHPRpCiPywDy8 4GJ3Hb5uoZlHNWlWDesf2+8Y22khUF379oFIxXg= X-Received: by 2002:a05:6512:322d:: with SMTP id f13mr3971359lfe.571.1604241916924; Sun, 01 Nov 2020 06:45:16 -0800 (PST) MIME-Version: 1.0 References: <20201025221735.3062-1-digetx@gmail.com> <20201025221735.3062-52-digetx@gmail.com> In-Reply-To: <20201025221735.3062-52-digetx@gmail.com> Reply-To: cwchoi00@gmail.com From: Chanwoo Choi Date: Sun, 1 Nov 2020 23:44:40 +0900 Message-ID: Subject: Re: [PATCH v6 51/52] PM / devfreq: tegra30: Support interconnect and OPPs from device-tree To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Georgi Djakov , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mikko Perttunen , Viresh Kumar , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski , linux-tegra@vger.kernel.org, Linux PM list , linux-kernel , dri-devel , devicetree Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Mon, Oct 26, 2020 at 7:22 AM Dmitry Osipenko wrote: > > This patch moves ACTMON driver away from generating OPP table by itself, > transitioning it to use the table which comes from device-tree. This > change breaks compatibility with older device-trees in order to bring > support for the interconnect framework to the driver. This is a mandatory > change which needs to be done in order to implement interconnect-based > memory DVFS. Users of legacy device-trees will get a message telling that > theirs DT needs to be upgraded. Now ACTMON issues memory bandwidth request > using dev_pm_opp_set_bw(), instead of driving EMC clock rate directly. > > Tested-by: Peter Geis > Tested-by: Nicolas Chauvet > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra30-devfreq.c | 91 ++++++++++++++++--------------- > 1 file changed, 48 insertions(+), 43 deletions(-) > > diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c > index 3f732ab53573..1b0b91a71886 100644 > --- a/drivers/devfreq/tegra30-devfreq.c > +++ b/drivers/devfreq/tegra30-devfreq.c > @@ -19,6 +19,8 @@ > #include > #include > > +#include > + This patch touches the OPP. Is it related to this change? > #include "governor.h" > > #define ACTMON_GLB_STATUS 0x0 > @@ -155,6 +157,7 @@ struct tegra_devfreq_device { > > struct tegra_devfreq { > struct devfreq *devfreq; > + struct opp_table *opp_table; > > struct reset_control *reset; > struct clk *clock; > @@ -612,34 +615,19 @@ static void tegra_actmon_stop(struct tegra_devfreq *tegra) > static int tegra_devfreq_target(struct device *dev, unsigned long *freq, > u32 flags) > { > - struct tegra_devfreq *tegra = dev_get_drvdata(dev); > - struct devfreq *devfreq = tegra->devfreq; > struct dev_pm_opp *opp; > - unsigned long rate; > - int err; > + int ret; > > opp = devfreq_recommended_opp(dev, freq, flags); > if (IS_ERR(opp)) { > - dev_err(dev, "Failed to find opp for %lu Hz\n", *freq); > + dev_err(dev, "failed to find opp for %lu Hz\n", *freq); You used the 'Failed to' format in almost every error case. Don't need to change it. (snip) Best Regards, Chanwoo Choi