Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp629131pxu; Sun, 22 Nov 2020 22:51:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvNq7tileTRHWyfHMYbSIJB5TuX06Xo0qQpBSSPgJsi5ompsYed1heeosSYOPawxWOVQPU X-Received: by 2002:a17:906:5cb:: with SMTP id t11mr15561199ejt.295.1606114305351; Sun, 22 Nov 2020 22:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606114305; cv=none; d=google.com; s=arc-20160816; b=WMuxa/zUYOsCTIwEMEYNXjLST/LlbFLtTOGD5nKQP+Crkkd6e7yIaKMIbuHyMBaRCg Y9bZwkROS5vzaC577L+4SF89abuIeYg0PPLgs/5F+2ezKHfqDK8G+T1RHMhzQuNpecsM RX0X1CD+RMbqTyYKaSrEMLs9XwPBlSOZYTtDZq4V8P/VjU2IZEvT3EiVA8JAh9K0+Knq SkGF7jqb76YgJjsezuy4ycZSHi9QSIk2PLrJkY/w7fiRVMSm5lVmajzlOZ4xAaTxuVm3 8jtOC6KNijxkLSaHZtZlq99bNlkg4WeUIxFrOTTJlX/q5uEKnUbvA8Magj9pbHkliJP1 SEwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=lcDKjZ+U9Db0F5hQBrE+mcrhjCcbBQBIaAD7QPcR3f8=; b=CnGYBF5g/94YGJ5t0eQYSkrtCTVNhEFYIKQZ90YCpIjmkNUNzf+8Keds6XvXFCnFyG 7CQL+Ekl0iuX4jT0TtHxvZDsfyfGgQkqJS/DiC+Qa/093JvobR8AYxis50aWG9MhBa/N 507t4zbAxBaGOwAFEgXxNu/701IKuPx/Q9ULWOmjB7guDSeYsqMFeoa0qiVE9c8u1Brb F5J5hIFoUiWvvzSGyh0a6zY62phga3ZAOXFISHlT+C4n0tjLkYWcnGQQ113xyzl6kVjK N6WXF9kwjG8EyExvW5t0fheQ3om9LDJR46BYmjNQTMvWuRS7hSBcOwnLz3Kc3uwgljZQ hPbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=nPyloAzS; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si5987663ejm.219.2020.11.22.22.51.22; Sun, 22 Nov 2020 22:51:45 -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=@samsung.com header.s=mail20170921 header.b=nPyloAzS; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbgKWGsQ (ORCPT + 99 others); Mon, 23 Nov 2020 01:48:16 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:60588 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727647AbgKWGsP (ORCPT ); Mon, 23 Nov 2020 01:48:15 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20201123064811epoutp04a7bd5a206d316c5e0b94d9abce5eb445~KEEG60ZBL2659726597epoutp04q for ; Mon, 23 Nov 2020 06:48:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20201123064811epoutp04a7bd5a206d316c5e0b94d9abce5eb445~KEEG60ZBL2659726597epoutp04q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1606114091; bh=lcDKjZ+U9Db0F5hQBrE+mcrhjCcbBQBIaAD7QPcR3f8=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=nPyloAzS+v99deEmI+Wp92vJoD7j5PG56gvyZNejG68GezGSsVE7749/DmwNauPNl RBd+BOKhs0GQW22oZZ27oqkk0MbJBrZA7wk9TfMfkNe0jqsSGtu3sQ/mZEiyxTI3Gu s7o3jY7CvttSqRoEVZ8GZMGjiFtupum/afC8r+JA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20201123064810epcas1p22a9009c2e8120e6af8c22e6d80d2fdf7~KEEGA3qmZ1393413934epcas1p2g; Mon, 23 Nov 2020 06:48:10 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.156]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4Cfd5N0phNzMqYkk; Mon, 23 Nov 2020 06:48:08 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.67.10463.72B5BBF5; Mon, 23 Nov 2020 15:48:07 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201123064807epcas1p2e110146738744eadc501ee5de8ca2483~KEEDSG57W2090020900epcas1p2l; Mon, 23 Nov 2020 06:48:07 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201123064807epsmtrp2355cdb6e88910663d4c54d4a9b0d17b8~KEEDRC4Ec1092710927epsmtrp2R; Mon, 23 Nov 2020 06:48:07 +0000 (GMT) X-AuditID: b6c32a38-f11ff700000028df-d9-5fbb5b27a2c2 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 60.C9.08745.72B5BBF5; Mon, 23 Nov 2020 15:48:07 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201123064807epsmtip13f76a1dea9f3c57e2923becaa965bc42~KEECuk7og1625516255epsmtip12; Mon, 23 Nov 2020 06:48:07 +0000 (GMT) Subject: Re: [PATCH v10 11/19] PM / devfreq: tegra20: Deprecate in a favor of emc-stat based driver To: Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Georgi Djakov , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Mikko Perttunen , Viresh Kumar , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <8b173eba-1587-19e3-296a-84f3c88ee96c@samsung.com> Date: Mon, 23 Nov 2020 16:02:26 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20201123002723.28463-12-digetx@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Te1BUVRzHPfcud+86s3hZMI4UBpdRAgfkuqweHFCmpFaJYjIb03GWDe4s O+xr9pFANWm4vEFXImxbEOlFS4yysAgrG7SQDDYGoRHyGCDBIR+QkmXCOLFcm/jv8/v9vr/z O9/zIHHRDBFEKjVGVq+Rq2hiLa+1OyIqKvzwJVnM4+l4NPdgxgc13L8J0PWH8wSqcjsIdMJa x0P9/Rf4yDnzLYaufnSXj665bARaKOsBqOhPK4F+vpKERo/XE+h0YyVAV28lI7O7h4+eDDXx 0D+uGh5qnrxMJPpL54fNfGm7d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vZVYijMS DbWYi4oTAYThl0ZiAwAA X-CMS-MailID: 20201123064807epcas1p2e110146738744eadc501ee5de8ca2483 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201123003309epcas1p4b8eead07cefc84537160a2b867d61ee7 References: <20201123002723.28463-1-digetx@gmail.com> <20201123002723.28463-12-digetx@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/23/20 9:27 AM, Dmitry Osipenko wrote: > Remove tegra20-devfreq in order to replace it with a EMC_STAT based > devfreq driver. Previously we were going to use MC_STAT based > tegra20-devfreq driver because EMC_STAT wasn't working properly, but > now that problem is resolved. This resolves complications imposed by > the removed driver since it was depending on both EMC and MC drivers > simultaneously. > > Acked-by: Chanwoo Choi > Signed-off-by: Dmitry Osipenko > --- > MAINTAINERS | 1 - > drivers/devfreq/Kconfig | 10 -- > drivers/devfreq/Makefile | 1 - > drivers/devfreq/tegra20-devfreq.c | 210 ------------------------------ > 4 files changed, 222 deletions(-) > delete mode 100644 drivers/devfreq/tegra20-devfreq.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 5f10105cac6f..56c560320f00 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11370,7 +11370,6 @@ L: linux-pm@vger.kernel.org > L: linux-tegra@vger.kernel.org > T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git > S: Maintained > -F: drivers/devfreq/tegra20-devfreq.c > F: drivers/devfreq/tegra30-devfreq.c > > MEMORY MANAGEMENT > diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig > index 0ee36ae2fa79..00704efe6398 100644 > --- a/drivers/devfreq/Kconfig > +++ b/drivers/devfreq/Kconfig > @@ -121,16 +121,6 @@ config ARM_TEGRA_DEVFREQ > It reads ACTMON counters of memory controllers and adjusts the > operating frequencies and voltages with OPP support. > > -config ARM_TEGRA20_DEVFREQ > - tristate "NVIDIA Tegra20 DEVFREQ Driver" > - depends on ARCH_TEGRA_2x_SOC || COMPILE_TEST > - depends on COMMON_CLK > - select DEVFREQ_GOV_SIMPLE_ONDEMAND > - help > - This adds the DEVFREQ driver for the Tegra20 family of SoCs. > - It reads Memory Controller counters and adjusts the operating > - frequencies and voltages with OPP support. > - > config ARM_RK3399_DMC_DEVFREQ > tristate "ARM RK3399 DMC DEVFREQ Driver" > depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \ > diff --git a/drivers/devfreq/Makefile b/drivers/devfreq/Makefile > index 3ca1ad0ecb97..a16333ea7034 100644 > --- a/drivers/devfreq/Makefile > +++ b/drivers/devfreq/Makefile > @@ -13,7 +13,6 @@ obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o > obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o > obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ) += rk3399_dmc.o > obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o > -obj-$(CONFIG_ARM_TEGRA20_DEVFREQ) += tegra20-devfreq.o > > # DEVFREQ Event Drivers > obj-$(CONFIG_PM_DEVFREQ_EVENT) += event/ > diff --git a/drivers/devfreq/tegra20-devfreq.c b/drivers/devfreq/tegra20-devfreq.c > deleted file mode 100644 > index fd801534771d..000000000000 > --- a/drivers/devfreq/tegra20-devfreq.c > +++ /dev/null > @@ -1,210 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * NVIDIA Tegra20 devfreq driver > - * > - * Copyright (C) 2019 GRATE-DRIVER project > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include > - > -#include "governor.h" > - > -#define MC_STAT_CONTROL 0x90 > -#define MC_STAT_EMC_CLOCK_LIMIT 0xa0 > -#define MC_STAT_EMC_CLOCKS 0xa4 > -#define MC_STAT_EMC_CONTROL 0xa8 > -#define MC_STAT_EMC_COUNT 0xb8 > - > -#define EMC_GATHER_CLEAR (1 << 8) > -#define EMC_GATHER_ENABLE (3 << 8) > - > -struct tegra_devfreq { > - struct devfreq *devfreq; > - struct clk *emc_clock; > - void __iomem *regs; > -}; > - > -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; > - > - opp = devfreq_recommended_opp(dev, freq, flags); > - if (IS_ERR(opp)) > - return PTR_ERR(opp); > - > - rate = dev_pm_opp_get_freq(opp); > - dev_pm_opp_put(opp); > - > - err = clk_set_min_rate(tegra->emc_clock, rate); > - if (err) > - return err; > - > - err = clk_set_rate(tegra->emc_clock, 0); > - if (err) > - goto restore_min_rate; > - > - return 0; > - > -restore_min_rate: > - clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); > - > - return err; > -} > - > -static int tegra_devfreq_get_dev_status(struct device *dev, > - struct devfreq_dev_status *stat) > -{ > - struct tegra_devfreq *tegra = dev_get_drvdata(dev); > - > - /* > - * EMC_COUNT returns number of memory events, that number is lower > - * than the number of clocks. Conversion ratio of 1/8 results in a > - * bit higher bandwidth than actually needed, it is good enough for > - * the time being because drivers don't support requesting minimum > - * needed memory bandwidth yet. > - * > - * TODO: adjust the ratio value once relevant drivers will support > - * memory bandwidth management. > - */ > - stat->busy_time = readl_relaxed(tegra->regs + MC_STAT_EMC_COUNT); > - stat->total_time = readl_relaxed(tegra->regs + MC_STAT_EMC_CLOCKS) / 8; > - stat->current_frequency = clk_get_rate(tegra->emc_clock); > - > - writel_relaxed(EMC_GATHER_CLEAR, tegra->regs + MC_STAT_CONTROL); > - writel_relaxed(EMC_GATHER_ENABLE, tegra->regs + MC_STAT_CONTROL); > - > - return 0; > -} > - > -static struct devfreq_dev_profile tegra_devfreq_profile = { > - .polling_ms = 500, > - .target = tegra_devfreq_target, > - .get_dev_status = tegra_devfreq_get_dev_status, > -}; > - > -static struct tegra_mc *tegra_get_memory_controller(void) > -{ > - struct platform_device *pdev; > - struct device_node *np; > - struct tegra_mc *mc; > - > - np = of_find_compatible_node(NULL, NULL, "nvidia,tegra20-mc-gart"); > - if (!np) > - return ERR_PTR(-ENOENT); > - > - pdev = of_find_device_by_node(np); > - of_node_put(np); > - if (!pdev) > - return ERR_PTR(-ENODEV); > - > - mc = platform_get_drvdata(pdev); > - if (!mc) > - return ERR_PTR(-EPROBE_DEFER); > - > - return mc; > -} > - > -static int tegra_devfreq_probe(struct platform_device *pdev) > -{ > - struct tegra_devfreq *tegra; > - struct tegra_mc *mc; > - unsigned long max_rate; > - unsigned long rate; > - int err; > - > - mc = tegra_get_memory_controller(); > - if (IS_ERR(mc)) { > - err = PTR_ERR(mc); > - dev_err(&pdev->dev, "failed to get memory controller: %d\n", > - err); > - return err; > - } > - > - tegra = devm_kzalloc(&pdev->dev, sizeof(*tegra), GFP_KERNEL); > - if (!tegra) > - return -ENOMEM; > - > - /* EMC is a system-critical clock that is always enabled */ > - tegra->emc_clock = devm_clk_get(&pdev->dev, "emc"); > - if (IS_ERR(tegra->emc_clock)) > - return dev_err_probe(&pdev->dev, PTR_ERR(tegra->emc_clock), > - "failed to get emc clock\n"); > - > - tegra->regs = mc->regs; > - > - max_rate = clk_round_rate(tegra->emc_clock, ULONG_MAX); > - > - for (rate = 0; rate <= max_rate; rate++) { > - rate = clk_round_rate(tegra->emc_clock, rate); > - > - err = dev_pm_opp_add(&pdev->dev, rate, 0); > - if (err) { > - dev_err(&pdev->dev, "failed to add opp: %d\n", err); > - goto remove_opps; > - } > - } > - > - /* > - * Reset statistic gathers state, select global bandwidth for the > - * statistics collection mode and set clocks counter saturation > - * limit to maximum. > - */ > - writel_relaxed(0x00000000, tegra->regs + MC_STAT_CONTROL); > - writel_relaxed(0x00000000, tegra->regs + MC_STAT_EMC_CONTROL); > - writel_relaxed(0xffffffff, tegra->regs + MC_STAT_EMC_CLOCK_LIMIT); > - > - platform_set_drvdata(pdev, tegra); > - > - tegra->devfreq = devfreq_add_device(&pdev->dev, &tegra_devfreq_profile, > - DEVFREQ_GOV_SIMPLE_ONDEMAND, NULL); > - if (IS_ERR(tegra->devfreq)) { > - err = PTR_ERR(tegra->devfreq); > - goto remove_opps; > - } > - > - return 0; > - > -remove_opps: > - dev_pm_opp_remove_all_dynamic(&pdev->dev); > - > - return err; > -} > - > -static int tegra_devfreq_remove(struct platform_device *pdev) > -{ > - struct tegra_devfreq *tegra = platform_get_drvdata(pdev); > - > - devfreq_remove_device(tegra->devfreq); > - dev_pm_opp_remove_all_dynamic(&pdev->dev); > - > - return 0; > -} > - > -static struct platform_driver tegra_devfreq_driver = { > - .probe = tegra_devfreq_probe, > - .remove = tegra_devfreq_remove, > - .driver = { > - .name = "tegra20-devfreq", > - }, > -}; > -module_platform_driver(tegra_devfreq_driver); > - > -MODULE_ALIAS("platform:tegra20-devfreq"); > -MODULE_AUTHOR("Dmitry Osipenko "); > -MODULE_DESCRIPTION("NVIDIA Tegra20 devfreq driver"); > -MODULE_LICENSE("GPL v2"); > Applied it. Thanks. -- Best Regards, Chanwoo Choi Samsung Electronics